********************************************************************************
** 	TITLE:		ca1988_ces_contact_netwroks                                   **
**	AUTHOR:	    Philippe Mongrain                                             **
**	DATA:       CES1988                                                       **
**	DATE:		October 2022 					                              **	
**	VERSION:	Stata 16					                                  **
********************************************************************************

* Version control

version 16.0

* Open log file

capture log close
log using "ca1988_ces_contact_netwroks", replace

* Open dataset

use "CES1988.dta", clear


**************************
** RELABELING DISTRICTS **
**************************

gen district = ""

replace district = "Other" if xm1 == 0
replace district = "Bonavista--Trinity--Conception" if xm1 == 1
replace district = "Burin--St. George's" if xm1 == 2
replace district = "Gander--Grand Falls" if xm1 == 3
replace district = "Humber--St. Barbe--Baie Verte" if xm1 == 4
replace district = "Labrador" if xm1 == 5
replace district = "St. John's East" if xm1 == 6
replace district = "St. John's West" if xm1 == 7
replace district = "Cardigan" if xm1 == 8
replace district = "Egmont" if xm1 == 9
replace district = "Hillsborough" if xm1 == 10
replace district = "Malpeque" if xm1 == 11
replace district = "Annapolis Valley-Hants " if xm1 == 12
replace district = "Cape Breton--East Richmond " if xm1 == 13
replace district = "Cape Breton Highlands--Canso" if xm1 == 14
replace district = "Cape Breton--The Sydneys" if xm1 == 15
replace district = "Central Nova" if xm1 == 16
replace district = "Cumberland--Colchester" if xm1 == 17
replace district = "Dartmouth" if xm1 == 18
replace district = "Halifax" if xm1 == 19
replace district = "Halifax West" if xm1 == 20
replace district = "South Shore" if xm1 == 21
replace district = "South West Nova" if xm1 == 22
replace district = "Beausejour" if xm1 == 23
replace district = "Carleton--Charlotte" if xm1 == 24
replace district = "Fredericton" if xm1 == 25
replace district = "Fundy--Royal" if xm1 == 26
replace district = "Gloucester" if xm1 == 27
replace district = "Madawaska--Victoria" if xm1 == 28
replace district = "Miramichi" if xm1 == 29
replace district = "Moncton" if xm1 == 30
replace district = "Restigouche" if xm1 == 31
replace district = "Saint John" if xm1 == 32
replace district = "Abitibi" if xm1 == 33
replace district = "Ahunstic" if xm1 == 34
replace district = "Anjou--Riviere-des-Prairies" if xm1 == 35
replace district = "Argenteuil--Papineau" if xm1 == 36
replace district = "Beauce" if xm1 == 37
replace district = "Beauharnois--Salaberry" if xm1 == 38
replace district = "Bellechasse" if xm1 == 39
replace district = "Berthier--Montcalm" if xm1 == 40
replace district = "Blainville--Deux-Montagne" if xm1 == 41
replace district = "Bonaventure--Iles-de-la-Madeleine" if xm1 == 42
replace district = "Bourassa" if xm1 == 43
replace district = "Brome--Missisquoi" if xm1 == 44
replace district = "Chambly" if xm1 == 45
replace district = "Champlain" if xm1 == 46
replace district = "Gatineau--La Lièvre (Chapleau)" if xm1 == 47
replace district = "Charlesbourg" if xm1 == 48
replace district = "Charlevoix" if xm1 == 49
replace district = "Chateauguay" if xm1 == 50
replace district = "Chicoutimi" if xm1 == 51
replace district = "Drummond" if xm1 == 52
replace district = "Duvernay" if xm1 == 53
replace district = "Frontenac" if xm1 == 54
replace district = "Gaspe" if xm1 == 55
replace district = "Hochelaga--Maisonneuve" if xm1 == 56
replace district = "Hull--Aylmer" if xm1 == 57
replace district = "Joliette" if xm1 == 58
replace district = "Jonquiere" if xm1 == 59
replace district = "Kamouraska-Riviere-du-Loup" if xm1 == 60
replace district = "Lachine--Lac-Saint-Louis" if xm1 == 61
replace district = "Lac-Saint-Jean" if xm1 == 62
replace district = "Langelier" if xm1 == 63
replace district = "La Prarie" if xm1 == 64
replace district = "Lasalle--Emard" if xm1 == 65
replace district = "Laurentides" if xm1 == 66
replace district = "Laurier--Sainte-Marie" if xm1 == 67
replace district = "Laval" if xm1 == 68
replace district = "Laval-des-Rapides" if xm1 == 69
replace district = "Levis" if xm1 == 70
replace district = "Longueuil" if xm1 == 71
replace district = "Lotbiniere" if xm1 == 72
replace district = "Louis-Hebert" if xm1 == 73
replace district = "Manicouagan" if xm1 == 74
replace district = "Matapedia--Matane" if xm1 == 75
replace district = "Megantic--Compton--Stanstead" if xm1 == 76
replace district = "Mercier" if xm1 == 77
replace district = "Montmorency--Orleans" if xm1 == 78
replace district = "Mount Royal" if xm1 == 79
replace district = "Notre-Dame-de-Grace-Lachine-Est" if xm1 == 80
replace district = "Outremont" if xm1 == 81
replace district = "Papineau--Saint-Michel" if xm1 == 82
replace district = "Pierrefonds--Dollard" if xm1 == 83
replace district = "Pontiac--Gatineau--Labelle" if xm1 == 84
replace district = "Portneuf" if xm1 == 85
replace district = "Quebec-Est" if xm1 == 86
replace district = "Richelieu" if xm1 == 87
replace district = "Richmond--Wolfe" if xm1 == 88
replace district = "Rimouski--Témiscouata" if xm1 == 89
replace district = "Roberval" if xm1 == 90
replace district = "Rosemont" if xm1 == 91
replace district = "Saint-Denis" if xm1 == 92
replace district = "Saint-Henri--Westmount" if xm1 == 93
replace district = "Saint-Hubert" if xm1 == 94
replace district = "Saint-Hyacinthe--Bagot" if xm1 == 95
replace district = "Saint-Jean" if xm1 == 96
replace district = "Saint-Laurent" if xm1 == 97
replace district = "Saint-Leonard" if xm1 == 98
replace district = "Saint-Maurice" if xm1 == 99
replace district = "Shefford" if xm1 == 100
replace district = "Sherbrooke" if xm1 == 101
replace district = "Temiscamingue" if xm1 == 102
replace district = "Terrebonne" if xm1 == 103
replace district = "Trois-Rivieres" if xm1 == 104
replace district = "Vaudreuil" if xm1 == 105
replace district = "Vercheres" if xm1 == 106
replace district = "Verdun--Saint-Paul" if xm1 == 107
replace district = "Algoma" if xm1 == 108
replace district = "Beaches--Woodbine" if xm1 == 109
replace district = "Brampton" if xm1 == 110
replace district = "Brampton--Malton" if xm1 == 111
replace district = "Brant" if xm1 == 112
replace district = "Broadview-Greenwood" if xm1 == 113
replace district = "Bruce--Grey" if xm1 == 114
replace district = "Burlington" if xm1 == 115
replace district = "Cambridge" if xm1 == 116
replace district = "Carleton--Gloucester" if xm1 == 117
replace district = "Cochrane--Superior" if xm1 == 118
replace district = "Davenport" if xm1 == 119
replace district = "Don Valley East" if xm1 == 120
replace district = "Don Valley North" if xm1 == 121
replace district = "Don Valley West" if xm1 == 122
replace district = "Durham" if xm1 == 123
replace district = "Eglinton--Lawrence" if xm1 == 124
replace district = "Elgin" if xm1 == 125
replace district = "Erie" if xm1 == 126
replace district = "Essex--Kent" if xm1 == 127
replace district = "Essex--Windsor" if xm1 == 128
replace district = "Etobicoke Centre" if xm1 == 129
replace district = "Etobicoke--Lakeshore" if xm1 == 130
replace district = "Etobicoke North" if xm1 == 131
replace district = "Glengarry--Prescott--Russell" if xm1 == 132
replace district = "Guelph--Wellington" if xm1 == 133
replace district = "Haldimand-Norfolk" if xm1 == 134
replace district = "Halton--Peel" if xm1 == 135
replace district = "Hamilton East" if xm1 == 136
replace district = "Hamilton Mountain" if xm1 == 137
replace district = "Hamilton--Wentworth" if xm1 == 138
replace district = "Hamilton West" if xm1 == 139
replace district = "Hastings--Frontenac--Lennox and Addington" if xm1 == 140
replace district = "Huron--Bruce" if xm1 == 141
replace district = "Kenora--Rainy River" if xm1 == 142
replace district = "Kent" if xm1 == 143
replace district = "Kingston and The Islands" if xm1 == 144
replace district = "Kitchener" if xm1 == 145
replace district = "Lambton--Kent--Middlesex" if xm1 == 146
replace district = "Lanark--Renfrew--Carleton" if xm1 == 147
replace district = "Leeds--Grenville" if xm1 == 148
replace district = "Lincoln" if xm1 == 149
replace district = "London East" if xm1 == 150
replace district = "London--Middlesex" if xm1 == 151
replace district = "London West" if xm1 == 152
replace district = "Markham" if xm1 == 153
replace district = "Mississauga East" if xm1 == 154
replace district = "Mississauga South" if xm1 == 155
replace district = "Mississauga West" if xm1 == 156
replace district = "Nepean" if xm1 == 157
replace district = "Niagara Falls" if xm1 == 158
replace district = "Nickel Belt" if xm1 == 159
replace district = "Nipissing" if xm1 == 160
replace district = "Northumberland" if xm1 == 161
replace district = "Oakville--Milton" if xm1 == 162
replace district = "Ontario" if xm1 == 163
replace district = "Oshawa" if xm1 == 164
replace district = "Ottawa Centre" if xm1 == 165
replace district = "Ottawa South" if xm1 == 166
replace district = "Ottawa--Vanier" if xm1 == 167
replace district = "Ottawa West" if xm1 == 168
replace district = "Oxford" if xm1 == 169
replace district = "Parkdale--High Park" if xm1 == 170
replace district = "Parry Sound--Muskok" if xm1 == 171
replace district = "Perth--Wellington--Waterloo" if xm1 == 172
replace district = "Peterborough" if xm1 == 173
replace district = "Prince Edward--Hastings" if xm1 == 174
replace district = "Renfrew--Nipissing--Pembroke" if xm1 == 175
replace district = "Rosedale" if xm1 == 176
replace district = "St. Catharines" if xm1 == 177
replace district = "St. Paul's" if xm1 == 178
replace district = "Samia--Lambton" if xm1 == 179
replace district = "Sault Ste. Marie" if xm1 == 180
replace district = "Scarborough--Agincourt" if xm1 == 181
replace district = "Scarborough Centre" if xm1 == 182
replace district = "Scarborough East" if xm1 == 183
replace district = "Scarborough--Rouge River" if xm1 == 184
replace district = "Scarborough West" if xm1 == 185
replace district = "Simcoe Centre" if xm1 == 186
replace district = "Simcoe North" if xm1 == 187
replace district = "Stormont--Dundas" if xm1 == 188
replace district = "Sudbury" if xm1 == 189
replace district = "Thunder Bay--Atikokan" if xm1 == 190
replace district = "Thunder Bay--Nipigon" if xm1 == 191
replace district = "Timiskaming" if xm1 == 192
replace district = "Timmins--Chapleau" if xm1 == 193
replace district = "Trinity--Spadina" if xm1 == 194
replace district = "Victoria--Haliburton" if xm1 == 195
replace district = "Waterloo" if xm1 == 196
replace district = "Welland--St. Catharines--Thorold" if xm1 == 197
replace district = "Wellington--Grey--Dufferin--Simcoe" if xm1 == 198
replace district = "Willowdale" if xm1 == 199
replace district = "Windsor--Lake St. Clair" if xm1 == 200
replace district = "Windsor West" if xm1 == 201
replace district = "York Centre" if xm1 == 202
replace district = "York North" if xm1 == 203
replace district = "York--Simcoe" if xm1 == 204
replace district = "York South--Weston" if xm1 == 205
replace district = "York West" if xm1 == 206
replace district = "Brandon-Souris" if xm1 == 207
replace district = "Churchill" if xm1 == 208
replace district = "Dauphin--Swan River" if xm1 == 209
replace district = "Lisgar--Marquette" if xm1 == 210
replace district = "Portage--Interlake" if xm1 == 211
replace district = "Provencher" if xm1 == 212
replace district = "St. Boniface" if xm1 == 213
replace district = "Selkirk" if xm1 == 214
replace district = "Winnipeg North" if xm1 == 215
replace district = "Winnipeg North Centre" if xm1 == 216
replace district = "Winnipeg--St. James" if xm1 == 217
replace district = "Winnipeg South" if xm1 == 218
replace district = "Winnipeg South Centre" if xm1 == 219
replace district = "Winnipeg--Transcona" if xm1 == 220
replace district = "Kindersley--Lloydminster" if xm1 == 221
replace district = "Mackenzie" if xm1 == 222
replace district = "Moose Jaw-Lake Centre" if xm1 == 223
replace district = "Prince Albert--Churchill River" if xm1 == 224
replace district = "Regina--Lumsden" if xm1 == 225
replace district = "Regina--Qu'Appelle " if xm1 == 226
replace district = "Regina--Wascana" if xm1 == 227
replace district = "Saskatoon--Clark's Crossing" if xm1 == 228
replace district = "Saskatoon--Dundurn" if xm1 == 229
replace district = "Saskatoon--Humboldt" if xm1 == 230
replace district = "Souris--Moose Mountain" if xm1 == 231
replace district = "Swift Current--Maple Creek--Assiniboia" if xm1 == 232
replace district = "The Battlefords--Meadow Lake" if xm1 == 233
replace district = "Yorkton--Melville" if xm1 == 234
replace district = "Athabasca" if xm1 == 235
replace district = "Beaver River" if xm1 == 236
replace district = "Calgary Centre" if xm1 == 237
replace district = "Calgary North" if xm1 == 238
replace district = "Calgary Northeast" if xm1 == 239
replace district = "Calgary Southeast" if xm1 == 240
replace district = "Calgary Southwest" if xm1 == 241
replace district = "Calgary West" if xm1 == 242
replace district = "Crowfoot" if xm1 == 243
replace district = "Edmonton East" if xm1 == 244
replace district = "Edmonton North" if xm1 == 245
replace district = "Edmonton Northwest" if xm1 == 246
replace district = "Edmonton Southeast" if xm1 == 247
replace district = "Edmonton Southwest" if xm1 == 248
replace district = "Edmonton--Strathcona" if xm1 == 249
replace district = "Elk Island" if xm1 == 250
replace district = "Lethbridge" if xm1 == 251
replace district = "Macleod" if xm1 == 252
replace district = "Medicine Hat" if xm1 == 253
replace district = "Peace River" if xm1 == 254
replace district = "Red Deer" if xm1 == 255
replace district = "St. Albert" if xm1 == 256
replace district = "Vegreville" if xm1 == 257
replace district = "Wetaskiwin" if xm1 == 258
replace district = "Wild Rose" if xm1 == 259
replace district = "Yellowhead" if xm1 == 260
replace district = "Burnaby--Kingsway" if xm1 == 261
replace district = "Capilano--Howe Sound" if xm1 == 262
replace district = "Cariboo--Chilcotin" if xm1 == 263
replace district = "Comox--Alberni" if xm1 == 264
replace district = "Delta--Richmond East" if xm1 == 265
replace district = "Esquimalt--Juan de Fuca" if xm1 == 266
replace district = "Fraser Valley East" if xm1 == 267
replace district = "Fraser Valley West" if xm1 == 268
replace district = "Kamloops" if xm1 == 269
replace district = "Kootenay East" if xm1 == 270
replace district = "Kootenay West--Revelstoke" if xm1 == 271
replace district = "Mission--Coquitlam" if xm1 == 272
replace district = "Nanaimo--Cowichan" if xm1 == 273
replace district = "New Westminster--Burnaby" if xm1 == 274
replace district = "North Island--Powell River" if xm1 == 275
replace district = "North Vancouver" if xm1 == 276
replace district = "Okanagan Centre" if xm1 == 277
replace district = "Okanagan--Shuswap" if xm1 == 278
replace district = "Okanagan--Similkameen--Merritt" if xm1 == 279
replace district = "Port Moody--Coquitlam" if xm1 == 280
replace district = "Prince George--Bulkley Valley" if xm1 == 281
replace district = "Prince George--Peace River" if xm1 == 282
replace district = "Richmond" if xm1 == 283
replace district = "Saanish--Gulf Islands" if xm1 == 284
replace district = "Skeena" if xm1 == 285
replace district = "Surrey North" if xm1 == 286
replace district = "Surrey--White Rock" if xm1 == 287
replace district = "Vancouver Centre" if xm1 == 288
replace district = "Vancouver East" if xm1 == 289
replace district = "Vancouver Quadra" if xm1 == 290
replace district = "Vancouver South" if xm1 == 291
replace district = "Victoria" if xm1 == 292
replace district = "Don't know" if xm1 == 998
replace district = "Refused" if xm1 == 999

replace district = lower(district)

label define district 0 "Other" 1 "Bonavista--Trinity--Conception" 2 "Burin--St. George's" 3 "Gander--Grand Falls" 4 "Humber--St. Barbe--Baie Verte" 5 "Labrador" 6 "St. John's East" 7 "St. John's West" 8 "Cardigan" 9 "Egmont" 10 "Hillsborough" 11 "Malpeque" 12 "Annapolis Valley-Hants " 13 "Cape Breton--East Richmond " 14 "Cape Breton Highlands--Canso" 15 "Cape Breton--The Sydneys" 16 "Central Nova" 17 "Cumberland--Colchester" 18 "Dartmouth" 19 "Halifax" 20 "Halifax West" 21 "South Shore" 22 "South West Nova" 23 "Beausejour" 24 "Carleton--Charlotte" 25 "Fredericton" 26 "Fundy--Royal" 27 "Gloucester" 28 "Madawaska--Victoria" 29 "Miramichi" 30 "Moncton" 31 "Restigouche" 32 "Saint John" 33 "Abitibi" 34 "Ahunstic" 35 "Anjou--Riviere-des-Prairies" 36 "Argenteuil--Papineau" 37 "Beauce" 38 "Beauharnois--Salaberry" 39 "Bellechasse" 40 "Berthier--Montcalm" 41 "Blainville--Deux-Montagne" 42 "Bonaventure--Iles-de-la-Madeleine" 43 "Bourassa" 44 "Brome--Missisquoi" 45 "Chambly" 46 "Champlain" 47 "Gatineau--La Lièvre (Chapleau)" 48 "Charlesbourg" 49 "Charlevoix" 50 "Chateauguay" 51 "Chicoutimi" 52 "Drummond" 53 "Duvernay" 54 "Frontenac" 55 "Gaspe" 56 "Hochelaga--Maisonneuve" 57 "Hull--Aylmer" 58 "Joliette" 59 "Jonquiere" 60 "Kamouraska-Riviere-du-Loup" 61 "Lachine--Lac-Saint-Louis" 62 "Lac-Saint-Jean" 63 "Langelier" 64 "La Prarie" 65 "Lasalle--Emard" 66 "Laurentides" 67 "Laurier--Sainte-Marie" 68 "Laval" 69 "Laval-des-Rapides" 70 "Levis" 71 "Longueuil" 72 "Lotbiniere" 73 "Louis-Hebert" 74 "Manicouagan" 75 "Matapedia--Matane" 76 "Megantic--Compton--Stanstead" 77 "Mercier" 78 "Montmorency--Orleans" 79 "Mount Royal" 80 "Notre-Dame-de-Grace-Lachine-Est" 81 "Outremont" 82 "Papineau--Saint-Michel" 83 "Pierrefonds--Dollard" 84 "Pontiac--Gatineau--Labelle" 85 "Portneuf" 86 "Quebec-Est" 87 "Richelieu" 88 "Richmond--Wolfe" 89 "Rimouski--Témiscouata" 90 "Roberval" 91 "Rosemont" 92 "Saint-Denis" 93 "Saint-Henri--Westmount" 94 "Saint-Hubert" 95 "Saint-Hyacinthe--Bagot" 96 "Saint-Jean" 97 "Saint-Laurent" 98 "Saint-Leonard" 99 "Saint-Maurice" 100 "Shefford" 101 "Sherbrooke" 102 "Temiscamingue" 103 "Terrebonne" 104 "Trois-Rivieres" 105 "Vaudreuil" 106 "Vercheres" 107 "Verdun--Saint-Paul" 108 "Algoma" 109 "Beaches--Woodbine" 110 "Brampton" 111 "Brampton--Malton" 112 "Brant" 113 "Broadview-Greenwood" 114 "Bruce--Grey" 115 "Burlington" 116 "Cambridge" 117 "Carleton--Gloucester" 118 "Cochrane--Superior" 119 "Davenport" 120 "Don Valley East" 121 "Don Valley North" 122 "Don Valley West" 123 "Durham" 124 "Eglinton--Lawrence" 125 "Elgin" 126 "Erie" 127 "Essex--Kent" 128 "Essex--Windsor" 129 "Etobicoke Centre" 130 "Etobicoke--Lakeshore" 131 "Etobicoke North" 132 "Glengarry--Prescott--Russell" 133 "Guelph--Wellington" 134 "Haldimand-Norfolk" 135 "Halton--Peel" 136 "Hamilton East" 137 "Hamilton Mountain" 138 "Hamilton--Wentworth" 139 "Hamilton West" 140 "Hastings--Frontenac--Lennox and Addington" 141 "Huron--Bruce" 142 "Kenora--Rainy River" 143 "Kent" 144 "Kingston and The Islands" 145 "Kitchener" 146 "Lambton--Kent--Middlesex" 147 "Lanark--Renfrew--Carleton" 148 "Leeds--Grenville" 149 "Lincoln" 150 "London East" 151 "London--Middlesex" 152 "London West" 153 "Markham" 154 "Mississauga East" 155 "Mississauga South" 156 "Mississauga West" 157 "Nepean" 158 "Niagara Falls" 159 "Nickel Belt" 160 "Nipissing" 161 "Northumberland" 162 "Oakville--Milton" 163 "Ontario" 164 "Oshawa" 165 "Ottawa Centre" 166 "Ottawa South" 167 "Ottawa--Vanier" 168 "Ottawa West" 169 "Oxford" 170 "Parkdale--High Park" 171 "Parry Sound--Muskok" 172 "Perth--Wellington--Waterloo" 173 "Peterborough" 174 "Prince Edward--Hastings" 175 "Renfrew--Nipissing--Pembroke" 176 "Rosedale" 177 "St. Catharines" 178 "St. Paul's" 179 "Samia--Lambton" 180 "Sault Ste. Marie" 181 "Scarborough--Agincourt" 182 "Scarborough Centre" 183 "Scarborough East" 184 "Scarborough--Rouge River" 185 "Scarborough West" 186 "Simcoe Centre" 187 "Simcoe North" 188 "Stormont--Dundas" 189 "Sudbury" 190 "Thunder Bay--Atikokan" 191 "Thunder Bay--Nipigon" 192 "Timiskaming" 193 "Timmins--Chapleau" 194 "Trinity--Spadina" 195 "Victoria--Haliburton" 196 "Waterloo" 197 "Welland--St. Catharines--Thorold" 198 "Wellington--Grey--Dufferin--Simcoe" 199 "Willowdale" 200 "Windsor--Lake St. Clair" 201 "Windsor West" 202 "York Centre" 203 "York North" 204 "York--Simcoe" 205 "York South--Weston" 206 "York West" 207 "Brandon-Souris" 208 "Churchill" 209 "Dauphin--Swan River" 210 "Lisgar--Marquette" 211 "Portage--Interlake" 212 "Provencher" 213 "St. Boniface" 214 "Selkirk" 215 "Winnipeg North" 216 "Winnipeg North Centre" 217 "Winnipeg--St. James" 218 "Winnipeg South" 219 "Winnipeg South Centre" 220 "Winnipeg--Transcona" 221 "Kindersley--Lloydminster" 222 "Mackenzie" 223 "Moose Jaw-Lake Centre" 224 "Prince Albert--Churchill River" 225 "Regina--Lumsden" 226 "Regina--Qu'Appelle " 227 "Regina--Wascana" 228 "Saskatoon--Clark's Crossing" 229 "Saskatoon--Dundurn" 230 "Saskatoon--Humboldt" 231 "Souris--Moose Mountain" 232 "Swift Current--Maple Creek--Assiniboia" 233 "The Battlefords--Meadow Lake" 234 "Yorkton--Melville" 235 "Athabasca" 236 "Beaver River" 237 "Calgary Centre" 238 "Calgary North" 239 "Calgary Northeast" 240 "Calgary Southeast" 241 "Calgary Southwest" 242 "Calgary West" 243 "Crowfoot" 244 "Edmonton East" 245 "Edmonton North" 246 "Edmonton Northwest" 247 "Edmonton Southeast" 248 "Edmonton Southwest" 249 "Edmonton--Strathcona" 250 "Elk Island" 251 "Lethbridge" 252 "Macleod" 253 "Medicine Hat" 254 "Peace River" 255 "Red Deer" 256 "St. Albert" 257 "Vegreville" 258 "Wetaskiwin" 259 "Wild Rose" 260 "Yellowhead" 261 "Burnaby--Kingsway" 262 "Capilano--Howe Sound" 263 "Cariboo--Chilcotin" 264 "Comox--Alberni" 265 "Delta--Richmond East" 266 "Esquimalt--Juan de Fuca" 267 "Fraser Valley East" 268 "Fraser Valley West" 269 "Kamloops" 270 "Kootenay East" 271 "Kootenay West--Revelstoke" 272 "Mission--Coquitlam" 273 "Nanaimo--Cowichan" 274 "New Westminster--Burnaby" 275 "North Island--Powell River" 276 "North Vancouver" 277 "Okanagan Centre" 278 "Okanagan--Shuswap" 279 "Okanagan--Similkameen--Merritt" 280 "Port Moody--Coquitlam" 281 "Prince George--Bulkley Valley" 282 "Prince George--Peace River" 283 "Richmond" 284 "Saanish--Gulf Islands" 285 "Skeena" 286 "Surrey North" 287 "Surrey--White Rock" 288 "Vancouver Centre" 289 "Vancouver East" 290 "Vancouver Quadra" 291 "Vancouver South" 292 "Victoria" 998 "Don't know" 999 "Refused"

label values xm1 district

gen district_code = .

replace district_code = 1 if district == "abitibi"
replace district_code = 2 if district == "ahuntsic"
replace district_code = 3 if district == "algoma"
replace district_code = 4 if district == "anjou--rivière-des-prairies"
replace district_code = 5 if district == "annapolis valley--hants"
replace district_code = 6 if district == "argenteuil--papineau"
replace district_code = 7 if district == "athabasca"
replace district_code = 8 if district == "beaches--woodbine"
replace district_code = 9 if district == "beauce"
replace district_code = 10 if district == "beauharnois--salaberry"
replace district_code = 11 if district == "beauséjour"
replace district_code = 12 if district == "beaver river"
replace district_code = 13 if district == "bellechasse"
replace district_code = 14 if district == "berthier--montcalm"
replace district_code = 15 if district == "blainville--deux-montagnes"
replace district_code = 16 if district == "bonaventure--Îles-de-la-madeleine"
replace district_code = 17 if district == "bonavista--trinity--conception"
replace district_code = 18 if district == "bourassa"
replace district_code = 19 if district == "brampton"
replace district_code = 20 if district == "brampton--malton"
replace district_code = 21 if district == "brandon--souris"
replace district_code = 22 if district == "brant"
replace district_code = 23 if district == "broadview--greenwood"
replace district_code = 24 if district == "brome--missisquoi"
replace district_code = 25 if district == "bruce--grey"
replace district_code = 26 if district == "burin--st. george's"
replace district_code = 27 if district == "burlington"
replace district_code = 28 if district == "burnaby--kingsway"
replace district_code = 29 if district == "calgary centre"
replace district_code = 30 if district == "calgary north/calgary-nord"
replace district_code = 31 if district == "calgary northeast/calgary-nord-est"
replace district_code = 32 if district == "calgary southeast"
replace district_code = 33 if district == "calgary southwest"
replace district_code = 34 if district == "calgary west"
replace district_code = 35 if district == "cambridge"
replace district_code = 36 if district == "cape breton highlands--canso"
replace district_code = 37 if district == "cape breton--east richmond"
replace district_code = 38 if district == "cape breton--the sydneys"
replace district_code = 39 if district == "capilano--howe sound"
replace district_code = 40 if district == "cardigan"
replace district_code = 41 if district == "cariboo--chilcotin"
replace district_code = 42 if district == "carleton--charlotte"
replace district_code = 43 if district == "carleton--gloucester"
replace district_code = 44 if district == "central nova"
replace district_code = 45 if district == "chambly"
replace district_code = 46 if district == "champlain"
replace district_code = 47 if district == "charlesbourg"
replace district_code = 48 if district == "charlevoix"
replace district_code = 49 if district == "chicoutimi"
replace district_code = 50 if district == "churchill"
replace district_code = 51 if district == "châteauguay"
replace district_code = 52 if district == "cochrane--superior"
replace district_code = 53 if district == "comox--alberni"
replace district_code = 54 if district == "crowfoot"
replace district_code = 55 if district == "cumberland--colchester"
replace district_code = 56 if district == "dartmouth"
replace district_code = 57 if district == "dauphin--swan river"
replace district_code = 58 if district == "davenport"
replace district_code = 59 if district == "delta--richmond east/delta--richmond-est"
replace district_code = 60 if district == "don valley east"
replace district_code = 61 if district == "don valley north"
replace district_code = 62 if district == "don valley west"
replace district_code = 63 if district == "drummond"
replace district_code = 64 if district == "durham"
replace district_code = 65 if district == "duvernay"
replace district_code = 66 if district == "edmonton east"
replace district_code = 67 if district == "edmonton north"
replace district_code = 68 if district == "edmonton northwest"
replace district_code = 69 if district == "edmonton southeast"
replace district_code = 70 if district == "edmonton southwest"
replace district_code = 71 if district == "edmonton--strathcona"
replace district_code = 72 if district == "eglinton--lawrence"
replace district_code = 73 if district == "egmont"
replace district_code = 74 if district == "elgin"
replace district_code = 75 if district == "elk island"
replace district_code = 76 if district == "erie"
replace district_code = 77 if district == "esquimalt--juan de fuca"
replace district_code = 78 if district == "essex--kent"
replace district_code = 79 if district == "essex--windsor"
replace district_code = 80 if district == "etobicoke centre"
replace district_code = 81 if district == "etobicoke north"
replace district_code = 82 if district == "etobicoke--lakeshore"
replace district_code = 83 if district == "fraser valley east"
replace district_code = 84 if district == "fraser valley west"
replace district_code = 85 if district == "fredericton"
replace district_code = 86 if district == "frontenac"
replace district_code = 87 if district == "fundy--royal"
replace district_code = 88 if district == "gander--grand falls"
replace district_code = 89 if district == "gaspé"
replace district_code = 90 if district == "gatineau--la lièvre"
replace district_code = 91 if district == "glengarry--prescott--russell"
replace district_code = 92 if district == "gloucester"
replace district_code = 93 if district == "guelph--wellington"
replace district_code = 94 if district == "haldimand--norfolk"
replace district_code = 95 if district == "halifax"
replace district_code = 96 if district == "halifax west"
replace district_code = 97 if district == "halton--peel"
replace district_code = 98 if district == "hamilton east"
replace district_code = 99 if district == "hamilton mountain"
replace district_code = 100 if district == "hamilton west"
replace district_code = 101 if district == "hamilton--wentworth"
replace district_code = 102 if district == "hastings--frontenac--lennox and addington"
replace district_code = 103 if district == "hillsborough"
replace district_code = 104 if district == "hochelaga--maisonneuve"
replace district_code = 105 if district == "hull--aylmer"
replace district_code = 106 if district == "humber--st. barbe--baie verte"
replace district_code = 107 if district == "huron--bruce"
replace district_code = 108 if district == "joliette"
replace district_code = 109 if district == "jonquière"
replace district_code = 110 if district == "kamloops"
replace district_code = 111 if district == "kamouraska--rivière-du-loup"
replace district_code = 112 if district == "kenora--rainy river"
replace district_code = 113 if district == "kent"
replace district_code = 114 if district == "kindersley--lloydminster"
replace district_code = 115 if district == "kingston and the islands"
replace district_code = 116 if district == "kitchener"
replace district_code = 117 if district == "kootenay east"
replace district_code = 118 if district == "kootenay west--revelstoke"
replace district_code = 119 if district == "la prairie"
replace district_code = 120 if district == "labrador"
replace district_code = 121 if district == "lac-saint-jean"
replace district_code = 122 if district == "lachine--lac-saint-louis"
replace district_code = 123 if district == "lambton--kent--middlesex"
replace district_code = 124 if district == "lanark--renfrew--carleton"
replace district_code = 125 if district == "langelier"
replace district_code = 126 if district == "lasalle--émard"
replace district_code = 127 if district == "laurentides"
replace district_code = 128 if district == "laurier--sainte-marie"
replace district_code = 129 if district == "laval"
replace district_code = 130 if district == "laval-des-rapides"
replace district_code = 131 if district == "leeds--grenville"
replace district_code = 132 if district == "lethbridge"
replace district_code = 133 if district == "lincoln"
replace district_code = 134 if district == "lisgar--marquette"
replace district_code = 135 if district == "london east"
replace district_code = 136 if district == "london west"
replace district_code = 137 if district == "london--middlesex"
replace district_code = 138 if district == "longueuil"
replace district_code = 139 if district == "lotbinière"
replace district_code = 140 if district == "louis-hébert"
replace district_code = 141 if district == "lévis"
replace district_code = 142 if district == "mackenzie"
replace district_code = 143 if district == "macleod"
replace district_code = 144 if district == "madawaska--victoria"
replace district_code = 145 if district == "malpeque"
replace district_code = 146 if district == "manicouagan"
replace district_code = 147 if district == "markham"
replace district_code = 148 if district == "matapédia--matane"
replace district_code = 149 if district == "medicine hat"
replace district_code = 150 if district == "mercier"
replace district_code = 151 if district == "miramichi"
replace district_code = 152 if district == "mission--coquitlam"
replace district_code = 153 if district == "mississauga east"
replace district_code = 154 if district == "mississauga south"
replace district_code = 155 if district == "mississauga west"
replace district_code = 156 if district == "moncton"
replace district_code = 157 if district == "montmorency--orléans"
replace district_code = 158 if district == "moose jaw--lake centre"
replace district_code = 159 if district == "mount royal"
replace district_code = 160 if district == "mégantic--compton--stanstead"
replace district_code = 161 if district == "nanaimo--cowichan"
replace district_code = 162 if district == "nepean"
replace district_code = 163 if district == "new westminster--burnaby"
replace district_code = 164 if district == "niagara falls"
replace district_code = 165 if district == "nickel belt"
replace district_code = 166 if district == "nipissing"
replace district_code = 167 if district == "north island--powell river"
replace district_code = 168 if district == "north vancouver"
replace district_code = 169 if district == "northumberland"
replace district_code = 170 if district == "notre-dame-de-grâce"
replace district_code = 171 if district == "nunatsiaq"
replace district_code = 172 if district == "oakville--milton"
replace district_code = 173 if district == "okanagan centre"
replace district_code = 174 if district == "okanagan--shuswap"
replace district_code = 175 if district == "okanagan--similkameen--merritt"
replace district_code = 176 if district == "ontario"
replace district_code = 177 if district == "oshawa"
replace district_code = 178 if district == "ottawa centre"
replace district_code = 179 if district == "ottawa south"
replace district_code = 180 if district == "ottawa west"
replace district_code = 181 if district == "ottawa--vanier"
replace district_code = 182 if district == "outremont"
replace district_code = 183 if district == "oxford"
replace district_code = 184 if district == "papineau--saint-michel"
replace district_code = 185 if district == "parkdale--high park"
replace district_code = 186 if district == "parry sound--muskoka"
replace district_code = 187 if district == "peace river"
replace district_code = 188 if district == "perth--wellington--waterloo"
replace district_code = 189 if district == "peterborough"
replace district_code = 190 if district == "pierrefonds--dollard"
replace district_code = 191 if district == "pontiac--gatineau--labelle"
replace district_code = 192 if district == "port moody--coquitlam"
replace district_code = 193 if district == "portage--interlake"
replace district_code = 194 if district == "portneuf"
replace district_code = 195 if district == "prince albert--churchill river"
replace district_code = 196 if district == "prince edward--hastings"
replace district_code = 197 if district == "prince george--bulkley valley"
replace district_code = 198 if district == "prince george--peace river"
replace district_code = 199 if district == "provencher"
replace district_code = 200 if district == "québec-est"
replace district_code = 201 if district == "red deer"
replace district_code = 202 if district == "regina--lumsden"
replace district_code = 203 if district == "regina--qu'appelle"
replace district_code = 204 if district == "regina--wascana"
replace district_code = 205 if district == "renfrew--nipissing--pembroke"
replace district_code = 206 if district == "restigouche"
replace district_code = 207 if district == "richelieu"
replace district_code = 208 if district == "richmond"
replace district_code = 209 if district == "richmond--wolfe"
replace district_code = 210 if district == "rimouski--témiscouata"
replace district_code = 211 if district == "roberval"
replace district_code = 212 if district == "rosedale"
replace district_code = 213 if district == "rosemont"
replace district_code = 214 if district == "saanich--gulf islands"
replace district_code = 215 if district == "saint john"
replace district_code = 216 if district == "saint-denis"
replace district_code = 217 if district == "saint-henri--westmount"
replace district_code = 218 if district == "saint-hubert"
replace district_code = 219 if district == "saint-hyacinthe--bagot"
replace district_code = 220 if district == "saint-jean"
replace district_code = 221 if district == "saint-laurent"
replace district_code = 222 if district == "saint-léonard"
replace district_code = 223 if district == "saint-maurice"
replace district_code = 224 if district == "sarnia--lambton"
replace district_code = 225 if district == "saskatoon--clark's crossing"
replace district_code = 226 if district == "saskatoon--dundurn"
replace district_code = 227 if district == "saskatoon--humboldt"
replace district_code = 228 if district == "sault ste. marie"
replace district_code = 229 if district == "scarborough centre"
replace district_code = 230 if district == "scarborough east"
replace district_code = 231 if district == "scarborough west"
replace district_code = 232 if district == "scarborough--agincourt"
replace district_code = 233 if district == "scarborough--rouge river"
replace district_code = 234 if district == "selkirk"
replace district_code = 235 if district == "shefford"
replace district_code = 236 if district == "sherbrooke"
replace district_code = 237 if district == "simcoe centre"
replace district_code = 238 if district == "simcoe north"
replace district_code = 239 if district == "skeena"
replace district_code = 240 if district == "souris--moose mountain"
replace district_code = 241 if district == "south shore"
replace district_code = 242 if district == "south west nova"
replace district_code = 243 if district == "st. albert"
replace district_code = 244 if district == "st. boniface"
replace district_code = 245 if district == "st. catharines"
replace district_code = 246 if district == "st. john's east"
replace district_code = 247 if district == "st. john's west"
replace district_code = 248 if district == "st. paul's"
replace district_code = 249 if district == "stormont--dundas"
replace district_code = 250 if district == "sudbury"
replace district_code = 251 if district == "surrey north"
replace district_code = 252 if district == "surrey--white rock"
replace district_code = 253 if district == "swift current--maple creek--assiniboia"
replace district_code = 254 if district == "terrebonne"
replace district_code = 255 if district == "the battlefords--meadow lake"
replace district_code = 256 if district == "thunder bay--atikokan"
replace district_code = 257 if district == "thunder bay--nipigon"
replace district_code = 258 if district == "timiskaming"
replace district_code = 259 if district == "timmins--chapleau"
replace district_code = 260 if district == "trinity--spadina"
replace district_code = 261 if district == "trois-rivières"
replace district_code = 262 if district == "témiscamingue"
replace district_code = 263 if district == "vancouver centre"
replace district_code = 264 if district == "vancouver east"
replace district_code = 265 if district == "vancouver quadra"
replace district_code = 266 if district == "vancouver south"
replace district_code = 267 if district == "vaudreuil"
replace district_code = 268 if district == "vegreville"
replace district_code = 269 if district == "verchères"
replace district_code = 270 if district == "verdun--saint-paul"
replace district_code = 271 if district == "victoria"
replace district_code = 272 if district == "victoria--haliburton"
replace district_code = 273 if district == "waterloo"
replace district_code = 274 if district == "welland--st. catharines--thorold"
replace district_code = 275 if district == "wellington--grey--dufferin--simcoe"
replace district_code = 276 if district == "western arctic"
replace district_code = 277 if district == "wetaskiwin"
replace district_code = 278 if district == "wild rose"
replace district_code = 279 if district == "willowdale"
replace district_code = 280 if district == "windsor west"
replace district_code = 281 if district == "windsor--lake st. clair"
replace district_code = 282 if district == "winnipeg north"
replace district_code = 283 if district == "winnipeg north centre"
replace district_code = 284 if district == "winnipeg south/winnipeg-sud"
replace district_code = 285 if district == "winnipeg south centre/winnipeg-centre-sud"
replace district_code = 286 if district == "winnipeg transcona"
replace district_code = 287 if district == "winnipeg--st. james"
replace district_code = 288 if district == "yellowhead"
replace district_code = 289 if district == "york centre"
replace district_code = 290 if district == "york north"
replace district_code = 291 if district == "york south--weston"
replace district_code = 292 if district == "york west"
replace district_code = 293 if district == "york--simcoe"
replace district_code = 294 if district == "yorkton--melville"
replace district_code = 295 if district == "yukon"


***********************
** DISTRICT OUTCOMES **
***********************

* Note: 1 = Liberal, 2 = Progressive Conservative, 3 = NDP

gen district_outcome = .

replace district_outcome = 1 if xm1 == 1
replace district_outcome = 1 if xm1 == 2
replace district_outcome = 1 if xm1 == 3
replace district_outcome = 1 if xm1 == 4
replace district_outcome = 1 if xm1 == 5
replace district_outcome = 2 if xm1 == 6
replace district_outcome = 2 if xm1 == 7
replace district_outcome = 1 if xm1 == 8
replace district_outcome = 1 if xm1 == 9
replace district_outcome = 1 if xm1 == 10
replace district_outcome = 1 if xm1 == 11
replace district_outcome = 2 if xm1 == 12
replace district_outcome = 1 if xm1 == 13
replace district_outcome = 1 if xm1 == 14
replace district_outcome = 1 if xm1 == 15
replace district_outcome = 2 if xm1 == 16
replace district_outcome = 2 if xm1 == 17
replace district_outcome = 1 if xm1 == 18
replace district_outcome = 1 if xm1 == 19
replace district_outcome = 2 if xm1 == 20
replace district_outcome = 2 if xm1 == 21
replace district_outcome = 1 if xm1 == 22
replace district_outcome = 1 if xm1 == 23
replace district_outcome = 2 if xm1 == 24
replace district_outcome = 2 if xm1 == 25
replace district_outcome = 2 if xm1 == 26
replace district_outcome = 1 if xm1 == 27
replace district_outcome = 2 if xm1 == 28
replace district_outcome = 1 if xm1 == 29
replace district_outcome = 1 if xm1 == 30
replace district_outcome = 1 if xm1 == 31
replace district_outcome = 2 if xm1 == 32
replace district_outcome = 2 if xm1 == 33
replace district_outcome = 2 if xm1 == 34
replace district_outcome = 2 if xm1 == 35
replace district_outcome = 2 if xm1 == 36
replace district_outcome = 2 if xm1 == 37
replace district_outcome = 2 if xm1 == 38
replace district_outcome = 2 if xm1 == 39
replace district_outcome = 2 if xm1 == 40
replace district_outcome = 2 if xm1 == 41
replace district_outcome = 2 if xm1 == 42
replace district_outcome = 2 if xm1 == 43
replace district_outcome = 2 if xm1 == 44
replace district_outcome = 2 if xm1 == 45
replace district_outcome = 2 if xm1 == 46
replace district_outcome = 1 if xm1 == 47
replace district_outcome = 2 if xm1 == 48
replace district_outcome = 2 if xm1 == 49
replace district_outcome = 2 if xm1 == 50
replace district_outcome = 2 if xm1 == 51
replace district_outcome = 2 if xm1 == 52
replace district_outcome = 2 if xm1 == 53
replace district_outcome = 2 if xm1 == 54
replace district_outcome = 2 if xm1 == 55
replace district_outcome = 2 if xm1 == 56
replace district_outcome = 1 if xm1 == 57
replace district_outcome = 2 if xm1 == 58
replace district_outcome = 2 if xm1 == 59
replace district_outcome = 2 if xm1 == 60
replace district_outcome = 2 if xm1 == 61
replace district_outcome = 2 if xm1 == 62
replace district_outcome = 2 if xm1 == 63
replace district_outcome = 2 if xm1 == 64
replace district_outcome = 1 if xm1 == 65
replace district_outcome = 2 if xm1 == 66
replace district_outcome = 1 if xm1 == 67
replace district_outcome = 2 if xm1 == 68
replace district_outcome = 2 if xm1 == 69
replace district_outcome = 2 if xm1 == 70
replace district_outcome = 2 if xm1 == 71
replace district_outcome = 2 if xm1 == 72
replace district_outcome = 2 if xm1 == 73
replace district_outcome = 2 if xm1 == 74
replace district_outcome = 2 if xm1 == 75
replace district_outcome = 2 if xm1 == 76
replace district_outcome = 2 if xm1 == 77
replace district_outcome = 2 if xm1 == 78
replace district_outcome = 1 if xm1 == 79
replace district_outcome = 1 if xm1 == 80
replace district_outcome = 2 if xm1 == 81
replace district_outcome = 1 if xm1 == 82
replace district_outcome = 2 if xm1 == 83
replace district_outcome = 2 if xm1 == 84
replace district_outcome = 2 if xm1 == 85
replace district_outcome = 2 if xm1 == 86
replace district_outcome = 2 if xm1 == 87
replace district_outcome = 2 if xm1 == 88
replace district_outcome = 2 if xm1 == 89
replace district_outcome = 2 if xm1 == 90
replace district_outcome = 2 if xm1 == 91
replace district_outcome = 1 if xm1 == 92
replace district_outcome = 1 if xm1 == 93
replace district_outcome = 2 if xm1 == 94
replace district_outcome = 2 if xm1 == 95
replace district_outcome = 2 if xm1 == 96
replace district_outcome = 1 if xm1 == 97
replace district_outcome = 1 if xm1 == 98
replace district_outcome = 2 if xm1 == 99
replace district_outcome = 1 if xm1 == 100
replace district_outcome = 2 if xm1 == 101
replace district_outcome = 2 if xm1 == 102
replace district_outcome = 2 if xm1 == 103
replace district_outcome = 2 if xm1 == 104
replace district_outcome = 2 if xm1 == 105
replace district_outcome = 2 if xm1 == 106
replace district_outcome = 2 if xm1 == 107
replace district_outcome = 1 if xm1 == 108
replace district_outcome = 3 if xm1 == 109
replace district_outcome = 2 if xm1 == 110
replace district_outcome = 2 if xm1 == 111
replace district_outcome = 3 if xm1 == 112
replace district_outcome = 1 if xm1 == 113
replace district_outcome = 2 if xm1 == 114
replace district_outcome = 2 if xm1 == 115
replace district_outcome = 2 if xm1 == 116
replace district_outcome = 1 if xm1 == 117
replace district_outcome = 1 if xm1 == 118
replace district_outcome = 1 if xm1 == 119
replace district_outcome = 2 if xm1 == 120
replace district_outcome = 2 if xm1 == 121
replace district_outcome = 2 if xm1 == 122
replace district_outcome = 2 if xm1 == 123
replace district_outcome = 1 if xm1 == 124
replace district_outcome = 2 if xm1 == 125
replace district_outcome = 2 if xm1 == 126
replace district_outcome = 1 if xm1 == 127
replace district_outcome = 3 if xm1 == 128
replace district_outcome = 2 if xm1 == 129
replace district_outcome = 2 if xm1 == 130
replace district_outcome = 1 if xm1 == 131
replace district_outcome = 1 if xm1 == 132
replace district_outcome = 2 if xm1 == 133
replace district_outcome = 1 if xm1 == 134
replace district_outcome = 2 if xm1 == 135
replace district_outcome = 1 if xm1 == 136
replace district_outcome = 1 if xm1 == 137
replace district_outcome = 2 if xm1 == 138
replace district_outcome = 1 if xm1 == 139
replace district_outcome = 2 if xm1 == 140
replace district_outcome = 2 if xm1 == 141
replace district_outcome = 1 if xm1 == 142
replace district_outcome = 1 if xm1 == 143
replace district_outcome = 1 if xm1 == 144
replace district_outcome = 2 if xm1 == 145
replace district_outcome = 1 if xm1 == 146
replace district_outcome = 2 if xm1 == 147
replace district_outcome = 1 if xm1 == 148
replace district_outcome = 2 if xm1 == 149
replace district_outcome = 1 if xm1 == 150
replace district_outcome = 2 if xm1 == 151
replace district_outcome = 2 if xm1 == 152
replace district_outcome = 2 if xm1 == 153
replace district_outcome = 1 if xm1 == 154
replace district_outcome = 2 if xm1 == 155
replace district_outcome = 2 if xm1 == 156
replace district_outcome = 1 if xm1 == 157
replace district_outcome = 2 if xm1 == 158
replace district_outcome = 3 if xm1 == 159
replace district_outcome = 1 if xm1 == 160
replace district_outcome = 1 if xm1 == 161
replace district_outcome = 2 if xm1 == 162
replace district_outcome = 2 if xm1 == 163
replace district_outcome = 3 if xm1 == 164
replace district_outcome = 1 if xm1 == 165
replace district_outcome = 1 if xm1 == 166
replace district_outcome = 1 if xm1 == 167
replace district_outcome = 1 if xm1 == 168
replace district_outcome = 2 if xm1 == 169
replace district_outcome = 1 if xm1 == 170
replace district_outcome = 2 if xm1 == 171
replace district_outcome = 2 if xm1 == 172
replace district_outcome = 2 if xm1 == 173
replace district_outcome = 1 if xm1 == 174
replace district_outcome = 1 if xm1 == 175
replace district_outcome = 2 if xm1 == 176
replace district_outcome = 2 if xm1 == 177
replace district_outcome = 2 if xm1 == 178
replace district_outcome = 2 if xm1 == 179
replace district_outcome = 3 if xm1 == 180
replace district_outcome = 1 if xm1 == 181
replace district_outcome = 2 if xm1 == 182
replace district_outcome = 2 if xm1 == 183
replace district_outcome = 1 if xm1 == 184
replace district_outcome = 1 if xm1 == 185
replace district_outcome = 2 if xm1 == 186
replace district_outcome = 2 if xm1 == 187
replace district_outcome = 1 if xm1 == 188
replace district_outcome = 1 if xm1 == 189
replace district_outcome = 3 if xm1 == 190
replace district_outcome = 1 if xm1 == 191
replace district_outcome = 2 if xm1 == 192
replace district_outcome = 3 if xm1 == 193
replace district_outcome = 3 if xm1 == 194
replace district_outcome = 2 if xm1 == 195
replace district_outcome = 2 if xm1 == 196
replace district_outcome = 1 if xm1 == 197
replace district_outcome = 2 if xm1 == 198
replace district_outcome = 1 if xm1 == 199
replace district_outcome = 3 if xm1 == 200
replace district_outcome = 1 if xm1 == 201
replace district_outcome = 1 if xm1 == 202
replace district_outcome = 1 if xm1 == 203
replace district_outcome = 2 if xm1 == 204
replace district_outcome = 1 if xm1 == 205
replace district_outcome = 1 if xm1 == 206
replace district_outcome = 2 if xm1 == 207
replace district_outcome = 3 if xm1 == 208
replace district_outcome = 2 if xm1 == 209
replace district_outcome = 2 if xm1 == 210
replace district_outcome = 2 if xm1 == 211
replace district_outcome = 2 if xm1 == 212
replace district_outcome = 1 if xm1 == 213
replace district_outcome = 2 if xm1 == 214
replace district_outcome = 1 if xm1 == 215
replace district_outcome = 1 if xm1 == 216
replace district_outcome = 1 if xm1 == 217
replace district_outcome = 2 if xm1 == 218
replace district_outcome = 1 if xm1 == 219
replace district_outcome = 3 if xm1 == 220
replace district_outcome = 2 if xm1 == 221
replace district_outcome = 3 if xm1 == 222
replace district_outcome = 3 if xm1 == 223
replace district_outcome = 3 if xm1 == 224
replace district_outcome = 3 if xm1 == 225
replace district_outcome = 3 if xm1 == 226
replace district_outcome = 2 if xm1 == 227
replace district_outcome = 3 if xm1 == 228
replace district_outcome = 3 if xm1 == 229
replace district_outcome = 3 if xm1 == 230
replace district_outcome = 2 if xm1 == 231
replace district_outcome = 2 if xm1 == 232
replace district_outcome = 3 if xm1 == 233
replace district_outcome = 3 if xm1 == 234
replace district_outcome = 2 if xm1 == 235
replace district_outcome = 2 if xm1 == 236
replace district_outcome = 2 if xm1 == 237
replace district_outcome = 2 if xm1 == 238
replace district_outcome = 2 if xm1 == 239
replace district_outcome = 2 if xm1 == 240
replace district_outcome = 2 if xm1 == 241
replace district_outcome = 2 if xm1 == 242
replace district_outcome = 2 if xm1 == 243
replace district_outcome = 3 if xm1 == 244
replace district_outcome = 2 if xm1 == 245
replace district_outcome = 2 if xm1 == 246
replace district_outcome = 2 if xm1 == 247
replace district_outcome = 2 if xm1 == 248
replace district_outcome = 2 if xm1 == 249
replace district_outcome = 2 if xm1 == 250
replace district_outcome = 2 if xm1 == 251
replace district_outcome = 2 if xm1 == 252
replace district_outcome = 2 if xm1 == 253
replace district_outcome = 2 if xm1 == 254
replace district_outcome = 2 if xm1 == 255
replace district_outcome = 2 if xm1 == 256
replace district_outcome = 2 if xm1 == 257
replace district_outcome = 2 if xm1 == 258
replace district_outcome = 2 if xm1 == 259
replace district_outcome = 2 if xm1 == 260
replace district_outcome = 3 if xm1 == 261
replace district_outcome = 2 if xm1 == 262
replace district_outcome = 2 if xm1 == 263
replace district_outcome = 3 if xm1 == 264
replace district_outcome = 2 if xm1 == 265
replace district_outcome = 3 if xm1 == 266
replace district_outcome = 2 if xm1 == 267
replace district_outcome = 2 if xm1 == 268
replace district_outcome = 3 if xm1 == 269
replace district_outcome = 3 if xm1 == 270
replace district_outcome = 3 if xm1 == 271
replace district_outcome = 3 if xm1 == 272
replace district_outcome = 3 if xm1 == 273
replace district_outcome = 3 if xm1 == 274
replace district_outcome = 3 if xm1 == 275
replace district_outcome = 2 if xm1 == 276
replace district_outcome = 2 if xm1 == 277
replace district_outcome = 3 if xm1 == 278
replace district_outcome = 3 if xm1 == 279
replace district_outcome = 3 if xm1 == 280
replace district_outcome = 3 if xm1 == 281
replace district_outcome = 2 if xm1 == 282
replace district_outcome = 2 if xm1 == 283
replace district_outcome = 3 if xm1 == 284
replace district_outcome = 3 if xm1 == 285
replace district_outcome = 3 if xm1 == 286
replace district_outcome = 2 if xm1 == 287
replace district_outcome = 2 if xm1 == 288
replace district_outcome = 3 if xm1 == 289
replace district_outcome = 1 if xm1 == 290
replace district_outcome = 2 if xm1 == 291
replace district_outcome = 3 if xm1 == 292


*********************
** COMPETITIVENESS **
*********************

* Margin of victory by district

gen margin = .

replace margin = 31.27554 if district_code == 1
replace margin = 1.350559 if district_code == 2
replace margin = 29.79676 if district_code == 3
replace margin = 18.8325 if district_code == 4
replace margin = 4.090881 if district_code == 5
replace margin = 29.3141 if district_code == 6
replace margin = 25.52664 if district_code == 7
replace margin = 1.919086 if district_code == 8
replace margin = 42.82191 if district_code == 9
replace margin = 31.63586 if district_code == 10
replace margin = 31.37615 if district_code == 11
replace margin = 23.29697 if district_code == 12
replace margin = 38.81401 if district_code == 13
replace margin = 30.13415 if district_code == 14
replace margin = 41.08587 if district_code == 15
replace margin = 23.52562 if district_code == 16
replace margin = 8.393818 if district_code == 17
replace margin = 1.872917 if district_code == 18
replace margin = 27.01813 if district_code == 19
replace margin = 7.118294 if district_code == 20
replace margin = 16.07022 if district_code == 21
replace margin = 11.71886 if district_code == 22
replace margin = 2.932854 if district_code == 23
replace margin = 21.08855 if district_code == 24
replace margin = 1.970566 if district_code == 25
replace margin = 2.711803 if district_code == 26
replace margin = 25.43766 if district_code == 27
replace margin = 13.22347 if district_code == 28
replace margin = 33.69837 if district_code == 29
replace margin = 41.52401 if district_code == 30
replace margin = 38.51615 if district_code == 31
replace margin = 49.47419 if district_code == 32
replace margin = 51.74939 if district_code == 33
replace margin = 41.93572 if district_code == 34
replace margin = 12.32315 if district_code == 35
replace margin = 6.917892 if district_code == 36
replace margin = 45.3326 if district_code == 37
replace margin = 34.44265 if district_code == 38
replace margin = 17.10206 if district_code == 39
replace margin = 7.688473 if district_code == 40
replace margin = .8561134 if district_code == 41
replace margin = 5.63073 if district_code == 42
replace margin = 10.83104 if district_code == 43
replace margin = 10.19087 if district_code == 44
replace margin = 15.52026 if district_code == 45
replace margin = 45.59293 if district_code == 46
replace margin = 33.48877 if district_code == 47
replace margin = 65.81402 if district_code == 48
replace margin = 51.93507 if district_code == 49
replace margin = 33.2962 if district_code == 50
replace margin = 12.00591 if district_code == 51
replace margin = 4.038471 if district_code == 52
replace margin = 14.53244 if district_code == 53
replace margin = 21.62915 if district_code == 54
replace margin = 4.631351 if district_code == 55
replace margin = 4.40691 if district_code == 56
replace margin = 7.976166 if district_code == 57
replace margin = 40.12115 if district_code == 58
replace margin = 15.14337 if district_code == 59
replace margin = 6.777473 if district_code == 60
replace margin = 1.494606 if district_code == 61
replace margin = 16.54463 if district_code == 62
replace margin = 18.79333 if district_code == 63
replace margin = 17.34412 if district_code == 64
replace margin = 37.83347 if district_code == 65
replace margin = 1.667431 if district_code == 66
replace margin = 7.277084 if district_code == 67
replace margin = 6.073406 if district_code == 68
replace margin = 27.83095 if district_code == 69
replace margin = 34.36806 if district_code == 70
replace margin = 8.143858 if district_code == 71
replace margin = 20.07585 if district_code == 72
replace margin = 13.6929 if district_code == 73
replace margin = 4.285748 if district_code == 74
replace margin = 25.77057 if district_code == 75
replace margin = 2.006851 if district_code == 76
replace margin = 25.82024 if district_code == 77
replace margin = 17.09404 if district_code == 78
replace margin = 2.823303 if district_code == 79
replace margin = 7.94939 if district_code == 80
replace margin = 10.73784 if district_code == 81
replace margin = 1.795868 if district_code == 82
replace margin = 10.7745 if district_code == 83
replace margin = 20.20345 if district_code == 84
replace margin = 3.261395 if district_code == 85
replace margin = 53.75861 if district_code == 86
replace margin = 10.42721 if district_code == 87
replace margin = 24.26806 if district_code == 88
replace margin = 22.48417 if district_code == 89
replace margin = 3.9072 if district_code == 90
replace margin = 51.66239 if district_code == 91
replace margin = 9.020058 if district_code == 92
replace margin = 11.28807 if district_code == 93
replace margin = .4696617 if district_code == 94
replace margin = 5.033493 if district_code == 95
replace margin = 6.14225 if district_code == 96
replace margin = 23.0454 if district_code == 97
replace margin = 21.75714 if district_code == 98
replace margin = .1418495 if district_code == 99
replace margin = 3.983128 if district_code == 100
replace margin = 7.898201 if district_code == 101
replace margin = 2.011261 if district_code == 102
replace margin = 1.271538 if district_code == 103
replace margin = 5.020779 if district_code == 104
replace margin = 17.9627 if district_code == 105
replace margin = 37.73132 if district_code == 106
replace margin = 7.253986 if district_code == 107
replace margin = 30.26983 if district_code == 108
replace margin = 42.85757 if district_code == 109
replace margin = 19.89693 if district_code == 110
replace margin = 28.77419 if district_code == 111
replace margin = 3.481686 if district_code == 112
replace margin = 5.055611 if district_code == 113
replace margin = 11.60004 if district_code == 114
replace margin = 4.764668 if district_code == 115
replace margin = 5.697239 if district_code == 116
replace margin = 4.697422 if district_code == 117
replace margin = 10.55084 if district_code == 118
replace margin = 19.50519 if district_code == 119
replace margin = 20.46547 if district_code == 120
replace margin = 48.10329 if district_code == 121
replace margin = 1.286907 if district_code == 122
replace margin = 1.091152 if district_code == 123
replace margin = 12.46447 if district_code == 124
replace margin = 18.45125 if district_code == 125
replace margin = 2.749439 if district_code == 126
replace margin = 27.14906 if district_code == 127
replace margin = 9.409891 if district_code == 128
replace margin = 14.69894 if district_code == 129
replace margin = 25.04951 if district_code == 130
replace margin = 4.498447 if district_code == 131
replace margin = 39.81878 if district_code == 132
replace margin = .8471642 if district_code == 133
replace margin = 31.80136 if district_code == 134
replace margin = .1966858 if district_code == 135
replace margin = 8.158638 if district_code == 136
replace margin = .0165443 if district_code == 137
replace margin = 30.66796 if district_code == 138
replace margin = 22.83777 if district_code == 139
replace margin = 35.00288 if district_code == 140
replace margin = 35.26211 if district_code == 141
replace margin = 9.580524 if district_code == 142
replace margin = 19.30122 if district_code == 143
replace margin = 4.45491 if district_code == 144
replace margin = 11.73444 if district_code == 145
replace margin = 38.78646 if district_code == 146
replace margin = 21.28399 if district_code == 147
replace margin = 13.76773 if district_code == 148
replace margin = 43.78358 if district_code == 149
replace margin = 31.75072 if district_code == 150
replace margin = 18.37811 if district_code == 151
replace margin = 4.249466 if district_code == 152
replace margin = 4.137165 if district_code == 153
replace margin = 17.21251 if district_code == 154
replace margin = 6.637867 if district_code == 155
replace margin = 12.91034 if district_code == 156
replace margin = 37.6044 if district_code == 157
replace margin = 1.082489 if district_code == 158
replace margin = 27.9053 if district_code == 159
replace margin = 30.29281 if district_code == 160
replace margin = 14.80672 if district_code == 161
replace margin = 5.728001 if district_code == 162
replace margin = 12.1175 if district_code == 163
replace margin = 4.484928 if district_code == 164
replace margin = 21.15859 if district_code == 165
replace margin = 1.287189 if district_code == 166
replace margin = 27.60174 if district_code == 167
replace margin = 10.4359 if district_code == 168
replace margin = .0618973 if district_code == 169
replace margin = 26.71966 if district_code == 170
replace margin = 6.783291 if district_code == 171
replace margin = 18.86763 if district_code == 172
replace margin = 7.045622 if district_code == 173
replace margin = 7.287609 if district_code == 174
replace margin = 3.106842 if district_code == 175
replace margin = 16.62584 if district_code == 176
replace margin = 10.5215 if district_code == 177
replace margin = 1.535114 if district_code == 178
replace margin = 15.76883 if district_code == 179
replace margin = 10.91965 if district_code == 180
replace margin = 36.01633 if district_code == 181
replace margin = 3.716969 if district_code == 182
replace margin = 2.734215 if district_code == 183
replace margin = 12.76142 if district_code == 184
replace margin = 7.080822 if district_code == 185
replace margin = 12.16274 if district_code == 186
replace margin = 37.11862 if district_code == 187
replace margin = 2.090405 if district_code == 188
replace margin = 10.5331 if district_code == 189
replace margin = 9.559448 if district_code == 190
replace margin = 23.3128 if district_code == 191
replace margin = 8.045124 if district_code == 192
replace margin = 8.51993 if district_code == 193
replace margin = 30.81983 if district_code == 194
replace margin = 30.49038 if district_code == 195
replace margin = 6.948944 if district_code == 196
replace margin = 6.438999 if district_code == 197
replace margin = 6.321037 if district_code == 198
replace margin = 23.02858 if district_code == 199
replace margin = 29.78213 if district_code == 200
replace margin = 32.20742 if district_code == 201
replace margin = 31.08569 if district_code == 202
replace margin = 22.48188 if district_code == 203
replace margin = 1.130493 if district_code == 204
replace margin = 22.27348 if district_code == 205
replace margin = 9.342831 if district_code == 206
replace margin = 49.63512 if district_code == 207
replace margin = 16.84102 if district_code == 208
replace margin = 6.438545 if district_code == 209
replace margin = 34.83161 if district_code == 210
replace margin = 64.32227 if district_code == 211
replace margin = .1457405 if district_code == 212
replace margin = 8.656462 if district_code == 213
replace margin = 1.937443 if district_code == 214
replace margin = 4.437893 if district_code == 215
replace margin = 16.7891 if district_code == 216
replace margin = 2.323597 if district_code == 217
replace margin = 19.82061 if district_code == 218
replace margin = 18.70494 if district_code == 219
replace margin = 26.50921 if district_code == 220
replace margin = 4.830666 if district_code == 221
replace margin = 13.01205 if district_code == 222
replace margin = 15.17451 if district_code == 223
replace margin = 13.25214 if district_code == 224
replace margin = 12.14589 if district_code == 225
replace margin = 16.3205 if district_code == 226
replace margin = 7.108311 if district_code == 227
replace margin = 2.567387 if district_code == 228
replace margin = .9448853 if district_code == 229
replace margin = 4.32159 if district_code == 230
replace margin = 1.05402 if district_code == 231
replace margin = 1.953911 if district_code == 232
replace margin = 9.51041 if district_code == 233
replace margin = 8.383492 if district_code == 234
replace margin = 5.033249 if district_code == 235
replace margin = 40.73612 if district_code == 236
replace margin = 12.10571 if district_code == 237
replace margin = 6.234245 if district_code == 238
replace margin = 24.41868 if district_code == 239
replace margin = 14.35998 if district_code == 240
replace margin = 3.887482 if district_code == 241
replace margin = 8.501141 if district_code == 242
replace margin = 27.1109 if district_code == 243
replace margin = 17.87889 if district_code == 244
replace margin = 7.432472 if district_code == 245
replace margin = 8.835297 if district_code == 246
replace margin = 29.01511 if district_code == 247
replace margin = 6.696335 if district_code == 248
replace margin = 16.62894 if district_code == 249
replace margin = 14.26456 if district_code == 250
replace margin = 4.205566 if district_code == 251
replace margin = 19.15516 if district_code == 252
replace margin = 11.37387 if district_code == 253
replace margin = 34.21445 if district_code == 254
replace margin = 2.086143 if district_code == 255
replace margin = 3.177811 if district_code == 256
replace margin = 6.100086 if district_code == 257
replace margin = 3.080231 if district_code == 258
replace margin = 4.015621 if district_code == 259
replace margin = 1.196167 if district_code == 260
replace margin = 53.10023 if district_code == 261
replace margin = 8.436684 if district_code == 262
replace margin = .4240952 if district_code == 263
replace margin = 21.43003 if district_code == 264
replace margin = 13.46105 if district_code == 265
replace margin = 13.43946 if district_code == 266
replace margin = 25.64108 if district_code == 267
replace margin = 49.27652 if district_code == 268
replace margin = 48.70123 if district_code == 269
replace margin = 11.05453 if district_code == 270
replace margin = 8.032339 if district_code == 271
replace margin = 12.02699 if district_code == 272
replace margin = 8.760567 if district_code == 273
replace margin = 3.369907 if district_code == 274
replace margin = 20.63876 if district_code == 275
replace margin = 13.75694 if district_code == 276
replace margin = 31.66179 if district_code == 277
replace margin = 14.81384 if district_code == 278
replace margin = 3.65567 if district_code == 279
replace margin = 27.5426 if district_code == 280
replace margin = 6.251148 if district_code == 281
replace margin = 4.123974 if district_code == 282
replace margin = 5.190384 if district_code == 283
replace margin = 1.43684 if district_code == 284
replace margin = 29.51372 if district_code == 285
replace margin = 9.240789 if district_code == 286
replace margin = 4.082218 if district_code == 287
replace margin = 16.55984 if district_code == 288
replace margin = 38.10101 if district_code == 289
replace margin = .087677 if district_code == 290
replace margin = 30.57195 if district_code == 291
replace margin = 40.59359 if district_code == 292
replace margin = 12.04624 if district_code == 293
replace margin = 16.5125 if district_code == 294
replace margin = 16.14287 if district_code == 295

* Effective number of electoral parties by district

gen enep = .

replace enep = 2.344965 if district_code == 1
replace enep = 2.761626 if district_code == 2
replace enep = 2.545895 if district_code == 3
replace enep = 2.570526 if district_code == 4
replace enep = 2.686613 if district_code == 5
replace enep = 2.42489 if district_code == 6
replace enep = 2.689052 if district_code == 7
replace enep = 3.125712 if district_code == 8
replace enep = 1.845341 if district_code == 9
replace enep = 2.343074 if district_code == 10
replace enep = 2.327021 if district_code == 11
replace enep = 3.311721 if district_code == 12
replace enep = 2.018888 if district_code == 13
replace enep = 2.507619 if district_code == 14
replace enep = 2.225093 if district_code == 15
replace enep = 2.109111 if district_code == 16
replace enep = 2.216148 if district_code == 17
replace enep = 2.684752 if district_code == 18
replace enep = 2.764057 if district_code == 19
replace enep = 2.927137 if district_code == 20
replace enep = 2.989177 if district_code == 21
replace enep = 3.120836 if district_code == 22
replace enep = 3.020393 if district_code == 23
replace enep = 2.399728 if district_code == 24
replace enep = 2.819558 if district_code == 25
replace enep = 2.243338 if district_code == 26
replace enep = 2.701391 if district_code == 27
replace enep = 3.058155 if district_code == 28
replace enep = 2.793129 if district_code == 29
replace enep = 2.549564 if district_code == 30
replace enep = 2.729216 if district_code == 31
replace enep = 2.287867 if district_code == 32
replace enep = 2.161511 if district_code == 33
replace enep = 2.50495 if district_code == 34
replace enep = 3.170032 if district_code == 35
replace enep = 2.196436 if district_code == 36
replace enep = 2.007954 if district_code == 37
replace enep = 2.043036 if district_code == 38
replace enep = 2.992803 if district_code == 39
replace enep = 2.167434 if district_code == 40
replace enep = 3.065673 if district_code == 41
replace enep = 2.478572 if district_code == 42
replace enep = 2.619364 if district_code == 43
replace enep = 2.497452 if district_code == 44
replace enep = 2.774933 if district_code == 45
replace enep = 2.078216 if district_code == 46
replace enep = 2.226252 if district_code == 47
replace enep = 1.508552 if district_code == 48
replace enep = 1.845335 if district_code == 49
replace enep = 2.419628 if district_code == 50
replace enep = 2.967816 if district_code == 51
replace enep = 2.871696 if district_code == 52
replace enep = 3.320978 if district_code == 53
replace enep = 2.492751 if district_code == 54
replace enep = 2.529625 if district_code == 55
replace enep = 2.501196 if district_code == 56
replace enep = 3.100158 if district_code == 57
replace enep = 2.396311 if district_code == 58
replace enep = 3.101042 if district_code == 59
replace enep = 2.72776 if district_code == 60
replace enep = 2.639595 if district_code == 61
replace enep = 2.342209 if district_code == 62
replace enep = 2.37606 if district_code == 63
replace enep = 2.926577 if district_code == 64
replace enep = 2.254759 if district_code == 65
replace enep = 3.176609 if district_code == 66
replace enep = 3.238145 if district_code == 67
replace enep = 3.207196 if district_code == 68
replace enep = 3.05322 if district_code == 69
replace enep = 2.774786 if district_code == 70
replace enep = 3.881737 if district_code == 71
replace enep = 2.6284 if district_code == 72
replace enep = 2.258903 if district_code == 73
replace enep = 3.181252 if district_code == 74
replace enep = 3.021023 if district_code == 75
replace enep = 3.059793 if district_code == 76
replace enep = 2.87637 if district_code == 77
replace enep = 2.62106 if district_code == 78
replace enep = 2.59166 if district_code == 79
replace enep = 2.454444 if district_code == 80
replace enep = 2.811754 if district_code == 81
replace enep = 2.422153 if district_code == 82
replace enep = 3.551207 if district_code == 83
replace enep = 3.147285 if district_code == 84
replace enep = 2.804209 if district_code == 85
replace enep = 1.712046 if district_code == 86
replace enep = 2.737293 if district_code == 87
replace enep = 2.343327 if district_code == 88
replace enep = 2.204621 if district_code == 89
replace enep = 2.728753 if district_code == 90
replace enep = 1.833953 if district_code == 91
replace enep = 2.205655 if district_code == 92
replace enep = 3.048668 if district_code == 93
replace enep = 3.159482 if district_code == 94
replace enep = 2.772832 if district_code == 95
replace enep = 2.661409 if district_code == 96
replace enep = 2.410865 if district_code == 97
replace enep = 2.683993 if district_code == 98
replace enep = 3.225205 if district_code == 99
replace enep = 3.091431 if district_code == 100
replace enep = 3.11488 if district_code == 101
replace enep = 2.984389 if district_code == 102
replace enep = 2.624088 if district_code == 103
replace enep = 3.169483 if district_code == 104
replace enep = 2.674143 if district_code == 105
replace enep = 1.864175 if district_code == 106
replace enep = 2.97086 if district_code == 107
replace enep = 2.580004 if district_code == 108
replace enep = 2.117118 if district_code == 109
replace enep = 2.525594 if district_code == 110
replace enep = 2.277782 if district_code == 111
replace enep = 3.165151 if district_code == 112
replace enep = 3.074061 if district_code == 113
replace enep = 2.934774 if district_code == 114
replace enep = 2.986441 if district_code == 115
replace enep = 2.849056 if district_code == 116
replace enep = 2.842649 if district_code == 117
replace enep = 2.698037 if district_code == 118
replace enep = 2.463041 if district_code == 119
replace enep = 2.44735 if district_code == 120
replace enep = 2.012419 if district_code == 121
replace enep = 2.460017 if district_code == 122
replace enep = 2.824646 if district_code == 123
replace enep = 2.637647 if district_code == 124
replace enep = 2.949531 if district_code == 125
replace enep = 2.498023 if district_code == 126
replace enep = 2.481216 if district_code == 127
replace enep = 3.432805 if district_code == 128
replace enep = 2.603769 if district_code == 129
replace enep = 2.549053 if district_code == 130
replace enep = 2.824573 if district_code == 131
replace enep = 2.538007 if district_code == 132
replace enep = 3.078219 if district_code == 133
replace enep = 2.812641 if district_code == 134
replace enep = 2.921146 if district_code == 135
replace enep = 2.663748 if district_code == 136
replace enep = 2.886902 if district_code == 137
replace enep = 2.66866 if district_code == 138
replace enep = 2.516161 if district_code == 139
replace enep = 2.292536 if district_code == 140
replace enep = 2.394062 if district_code == 141
replace enep = 2.672311 if district_code == 142
replace enep = 2.71062 if district_code == 143
replace enep = 2.321733 if district_code == 144
replace enep = 2.288382 if district_code == 145
replace enep = 2.204429 if district_code == 146
replace enep = 2.537473 if district_code == 147
replace enep = 2.484081 if district_code == 148
replace enep = 2.517565 if district_code == 149
replace enep = 2.585171 if district_code == 150
replace enep = 2.642218 if district_code == 151
replace enep = 2.73871 if district_code == 152
replace enep = 2.548164 if district_code == 153
replace enep = 2.475153 if district_code == 154
replace enep = 2.417845 if district_code == 155
replace enep = 2.851599 if district_code == 156
replace enep = 2.261579 if district_code == 157
replace enep = 2.68212 if district_code == 158
replace enep = 2.157726 if district_code == 159
replace enep = 2.17136 if district_code == 160
replace enep = 2.691949 if district_code == 161
replace enep = 2.461322 if district_code == 162
replace enep = 3.050641 if district_code == 163
replace enep = 3.072755 if district_code == 164
replace enep = 3.230444 if district_code == 165
replace enep = 2.798814 if district_code == 166
replace enep = 2.793713 if district_code == 167
replace enep = 3.561841 if district_code == 168
replace enep = 2.78631 if district_code == 169
replace enep = 2.556162 if district_code == 170
replace enep = 3.089819 if district_code == 171
replace enep = 2.364794 if district_code == 172
replace enep = 3.566965 if district_code == 173
replace enep = 2.887162 if district_code == 174
replace enep = 3.229115 if district_code == 175
replace enep = 2.659952 if district_code == 176
replace enep = 2.835181 if district_code == 177
replace enep = 3.076552 if district_code == 178
replace enep = 2.502356 if district_code == 179
replace enep = 2.453965 if district_code == 180
replace enep = 2.325048 if district_code == 181
replace enep = 3.209342 if district_code == 182
replace enep = 3.078267 if district_code == 183
replace enep = 2.893026 if district_code == 184
replace enep = 2.834877 if district_code == 185
replace enep = 2.860784 if district_code == 186
replace enep = 2.739024 if district_code == 187
replace enep = 3.050707 if district_code == 188
replace enep = 2.988749 if district_code == 189
replace enep = 2.411906 if district_code == 190
replace enep = 2.471899 if district_code == 191
replace enep = 2.846872 if district_code == 192
replace enep = 3.449354 if district_code == 193
replace enep = 2.404302 if district_code == 194
replace enep = 2.434692 if district_code == 195
replace enep = 2.939719 if district_code == 196
replace enep = 3.232427 if district_code == 197
replace enep = 3.302862 if district_code == 198
replace enep = 2.376575 if district_code == 199
replace enep = 2.506375 if district_code == 200
replace enep = 2.818696 if district_code == 201
replace enep = 2.348152 if district_code == 202
replace enep = 2.430909 if district_code == 203
replace enep = 3.01798 if district_code == 204
replace enep = 2.416843 if district_code == 205
replace enep = 2.408071 if district_code == 206
replace enep = 1.929377 if district_code == 207
replace enep = 3.111593 if district_code == 208
replace enep = 2.479648 if district_code == 209
replace enep = 2.106225 if district_code == 210
replace enep = 1.646267 if district_code == 211
replace enep = 2.749157 if district_code == 212
replace enep = 3.653182 if district_code == 213
replace enep = 3.521895 if district_code == 214
replace enep = 2.836285 if district_code == 215
replace enep = 2.954504 if district_code == 216
replace enep = 2.893332 if district_code == 217
replace enep = 2.800404 if district_code == 218
replace enep = 2.437242 if district_code == 219
replace enep = 2.38343 if district_code == 220
replace enep = 2.528136 if district_code == 221
replace enep = 2.487845 if district_code == 222
replace enep = 2.806249 if district_code == 223
replace enep = 2.829956 if district_code == 224
replace enep = 2.614902 if district_code == 225
replace enep = 2.712597 if district_code == 226
replace enep = 2.777017 if district_code == 227
replace enep = 2.994645 if district_code == 228
replace enep = 2.790504 if district_code == 229
replace enep = 2.731722 if district_code == 230
replace enep = 3.004931 if district_code == 231
replace enep = 2.568349 if district_code == 232
replace enep = 2.617338 if district_code == 233
replace enep = 3.265489 if district_code == 234
replace enep = 2.343279 if district_code == 235
replace enep = 2.147061 if district_code == 236
replace enep = 2.901345 if district_code == 237
replace enep = 2.70329 if district_code == 238
replace enep = 2.630256 if district_code == 239
replace enep = 2.772109 if district_code == 240
replace enep = 2.454532 if district_code == 241
replace enep = 2.344732 if district_code == 242
replace enep = 3.283391 if district_code == 243
replace enep = 2.558606 if district_code == 244
replace enep = 2.926392 if district_code == 245
replace enep = 2.809923 if district_code == 246
replace enep = 2.04904 if district_code == 247
replace enep = 2.482688 if district_code == 248
replace enep = 3.04988 if district_code == 249
replace enep = 3.241775 if district_code == 250
replace enep = 3.253447 if district_code == 251
replace enep = 3.250886 if district_code == 252
replace enep = 2.863013 if district_code == 253
replace enep = 2.86638 if district_code == 254
replace enep = 2.721253 if district_code == 255
replace enep = 3.002321 if district_code == 256
replace enep = 2.906425 if district_code == 257
replace enep = 3.200845 if district_code == 258
replace enep = 2.984221 if district_code == 259
replace enep = 2.994613 if district_code == 260
replace enep = 1.937466 if district_code == 261
replace enep = 2.647501 if district_code == 262
replace enep = 3.062731 if district_code == 263
replace enep = 2.657165 if district_code == 264
replace enep = 3.007722 if district_code == 265
replace enep = 3.139755 if district_code == 266
replace enep = 2.419532 if district_code == 267
replace enep = 2.135113 if district_code == 268
replace enep = 2.057132 if district_code == 269
replace enep = 2.889587 if district_code == 270
replace enep = 3.486198 if district_code == 271
replace enep = 2.702644 if district_code == 272
replace enep = 2.73153 if district_code == 273
replace enep = 2.992338 if district_code == 274
replace enep = 2.67029 if district_code == 275
replace enep = 3.074292 if district_code == 276
replace enep = 3.12606 if district_code == 277
replace enep = 2.773285 if district_code == 278
replace enep = 2.396775 if district_code == 279
replace enep = 2.382542 if district_code == 280
replace enep = 2.744348 if district_code == 281
replace enep = 3.080998 if district_code == 282
replace enep = 3.000415 if district_code == 283
replace enep = 2.414855 if district_code == 284
replace enep = 2.294024 if district_code == 285
replace enep = 2.971799 if district_code == 286
replace enep = 2.638536 if district_code == 287
replace enep = 3.224446 if district_code == 288
replace enep = 2.269747 if district_code == 289
replace enep = 2.619523 if district_code == 290
replace enep = 2.572181 if district_code == 291
replace enep = 2.349869 if district_code == 292
replace enep = 2.73993 if district_code == 293
replace enep = 2.488945 if district_code == 294
replace enep = 2.487022 if district_code == 295


***************************
** INDEPENDENT VARIABLES **
***************************

* Time

gen sdate = .

replace sdate = 19881006 if idnum == 2
replace sdate = 19881009 if idnum == 3
replace sdate = 19881016 if idnum == 6
replace sdate = 19881018 if idnum == 9
replace sdate = 19881011 if idnum == 11
replace sdate = 19881014 if idnum == 13
replace sdate = 19881013 if idnum == 20
replace sdate = 19881008 if idnum == 24
replace sdate = 19881004 if idnum == 31
replace sdate = 19881005 if idnum == 36
replace sdate = 19881004 if idnum == 41
replace sdate = 19881004 if idnum == 44
replace sdate = 19881006 if idnum == 52
replace sdate = 19881004 if idnum == 55
replace sdate = 19881004 if idnum == 58
replace sdate = 19881014 if idnum == 64
replace sdate = 19881012 if idnum == 71
replace sdate = 19881006 if idnum == 76
replace sdate = 19881005 if idnum == 80
replace sdate = 19881012 if idnum == 90
replace sdate = 19881006 if idnum == 92
replace sdate = 19881004 if idnum == 94
replace sdate = 19881005 if idnum == 96
replace sdate = 19881005 if idnum == 97
replace sdate = 19881004 if idnum == 101
replace sdate = 19881004 if idnum == 103
replace sdate = 19881004 if idnum == 106
replace sdate = 19881004 if idnum == 119
replace sdate = 19881005 if idnum == 120
replace sdate = 19881005 if idnum == 122
replace sdate = 19881006 if idnum == 126
replace sdate = 19881004 if idnum == 131
replace sdate = 19881004 if idnum == 133
replace sdate = 19881005 if idnum == 135
replace sdate = 19881006 if idnum == 136
replace sdate = 19881011 if idnum == 137
replace sdate = 19881015 if idnum == 138
replace sdate = 19881015 if idnum == 141
replace sdate = 19881005 if idnum == 142
replace sdate = 19881007 if idnum == 154
replace sdate = 19881005 if idnum == 158
replace sdate = 19881004 if idnum == 159
replace sdate = 19881011 if idnum == 165
replace sdate = 19881015 if idnum == 168
replace sdate = 19881004 if idnum == 169
replace sdate = 19881006 if idnum == 172
replace sdate = 19881008 if idnum == 174
replace sdate = 19881004 if idnum == 179
replace sdate = 19881005 if idnum == 180
replace sdate = 19881005 if idnum == 184
replace sdate = 19881006 if idnum == 191
replace sdate = 19881005 if idnum == 193
replace sdate = 19881005 if idnum == 196
replace sdate = 19881004 if idnum == 197
replace sdate = 19881015 if idnum == 200
replace sdate = 19881005 if idnum == 203
replace sdate = 19881014 if idnum == 204
replace sdate = 19881004 if idnum == 205
replace sdate = 19881006 if idnum == 206
replace sdate = 19881004 if idnum == 208
replace sdate = 19881016 if idnum == 211
replace sdate = 19881005 if idnum == 213
replace sdate = 19881007 if idnum == 215
replace sdate = 19881005 if idnum == 217
replace sdate = 19881009 if idnum == 218
replace sdate = 19881014 if idnum == 220
replace sdate = 19881016 if idnum == 223
replace sdate = 19881004 if idnum == 227
replace sdate = 19881015 if idnum == 230
replace sdate = 19881004 if idnum == 239
replace sdate = 19881006 if idnum == 240
replace sdate = 19881006 if idnum == 246
replace sdate = 19881005 if idnum == 250
replace sdate = 19881008 if idnum == 273
replace sdate = 19881007 if idnum == 278
replace sdate = 19881007 if idnum == 279
replace sdate = 19881014 if idnum == 282
replace sdate = 19881007 if idnum == 283
replace sdate = 19881012 if idnum == 284
replace sdate = 19881009 if idnum == 289
replace sdate = 19881008 if idnum == 296
replace sdate = 19881014 if idnum == 298
replace sdate = 19881005 if idnum == 313
replace sdate = 19881006 if idnum == 315
replace sdate = 19881005 if idnum == 320
replace sdate = 19881005 if idnum == 321
replace sdate = 19881005 if idnum == 326
replace sdate = 19881005 if idnum == 327
replace sdate = 19881005 if idnum == 334
replace sdate = 19881005 if idnum == 338
replace sdate = 19881005 if idnum == 339
replace sdate = 19881005 if idnum == 340
replace sdate = 19881005 if idnum == 342
replace sdate = 19881008 if idnum == 343
replace sdate = 19881005 if idnum == 345
replace sdate = 19881005 if idnum == 348
replace sdate = 19881009 if idnum == 349
replace sdate = 19881008 if idnum == 355
replace sdate = 19881007 if idnum == 360
replace sdate = 19881006 if idnum == 361
replace sdate = 19881007 if idnum == 362
replace sdate = 19881005 if idnum == 363
replace sdate = 19881005 if idnum == 368
replace sdate = 19881005 if idnum == 371
replace sdate = 19881015 if idnum == 377
replace sdate = 19881006 if idnum == 378
replace sdate = 19881007 if idnum == 380
replace sdate = 19881005 if idnum == 383
replace sdate = 19881005 if idnum == 387
replace sdate = 19881005 if idnum == 389
replace sdate = 19881007 if idnum == 400
replace sdate = 19881005 if idnum == 403
replace sdate = 19881005 if idnum == 406
replace sdate = 19881005 if idnum == 407
replace sdate = 19881005 if idnum == 408
replace sdate = 19881005 if idnum == 409
replace sdate = 19881007 if idnum == 414
replace sdate = 19881005 if idnum == 418
replace sdate = 19881012 if idnum == 419
replace sdate = 19881006 if idnum == 423
replace sdate = 19881009 if idnum == 426
replace sdate = 19881005 if idnum == 431
replace sdate = 19881005 if idnum == 433
replace sdate = 19881005 if idnum == 435
replace sdate = 19881005 if idnum == 436
replace sdate = 19881005 if idnum == 437
replace sdate = 19881012 if idnum == 445
replace sdate = 19881005 if idnum == 455
replace sdate = 19881005 if idnum == 457
replace sdate = 19881005 if idnum == 459
replace sdate = 19881006 if idnum == 460
replace sdate = 19881005 if idnum == 464
replace sdate = 19881009 if idnum == 465
replace sdate = 19881009 if idnum == 467
replace sdate = 19881005 if idnum == 470
replace sdate = 19881012 if idnum == 479
replace sdate = 19881014 if idnum == 482
replace sdate = 19881005 if idnum == 484
replace sdate = 19881006 if idnum == 486
replace sdate = 19881006 if idnum == 487
replace sdate = 19881005 if idnum == 489
replace sdate = 19881005 if idnum == 490
replace sdate = 19881013 if idnum == 502
replace sdate = 19881005 if idnum == 505
replace sdate = 19881005 if idnum == 507
replace sdate = 19881007 if idnum == 509
replace sdate = 19881005 if idnum == 512
replace sdate = 19881005 if idnum == 521
replace sdate = 19881005 if idnum == 524
replace sdate = 19881005 if idnum == 529
replace sdate = 19881006 if idnum == 535
replace sdate = 19881011 if idnum == 548
replace sdate = 19881012 if idnum == 550
replace sdate = 19881007 if idnum == 553
replace sdate = 19881008 if idnum == 561
replace sdate = 19881011 if idnum == 563
replace sdate = 19881016 if idnum == 565
replace sdate = 19881007 if idnum == 567
replace sdate = 19881012 if idnum == 570
replace sdate = 19881008 if idnum == 572
replace sdate = 19881007 if idnum == 575
replace sdate = 19881011 if idnum == 585
replace sdate = 19881011 if idnum == 590
replace sdate = 19881015 if idnum == 592
replace sdate = 19881018 if idnum == 596
replace sdate = 19881008 if idnum == 597
replace sdate = 19881008 if idnum == 598
replace sdate = 19881009 if idnum == 599
replace sdate = 19881007 if idnum == 605
replace sdate = 19881011 if idnum == 610
replace sdate = 19881007 if idnum == 612
replace sdate = 19881008 if idnum == 614
replace sdate = 19881012 if idnum == 615
replace sdate = 19881012 if idnum == 622
replace sdate = 19881012 if idnum == 626
replace sdate = 19881007 if idnum == 628
replace sdate = 19881006 if idnum == 630
replace sdate = 19881006 if idnum == 633
replace sdate = 19881006 if idnum == 635
replace sdate = 19881017 if idnum == 638
replace sdate = 19881006 if idnum == 639
replace sdate = 19881007 if idnum == 645
replace sdate = 19881017 if idnum == 657
replace sdate = 19881006 if idnum == 663
replace sdate = 19881006 if idnum == 664
replace sdate = 19881006 if idnum == 670
replace sdate = 19881013 if idnum == 673
replace sdate = 19881006 if idnum == 674
replace sdate = 19881006 if idnum == 675
replace sdate = 19881009 if idnum == 676
replace sdate = 19881012 if idnum == 678
replace sdate = 19881006 if idnum == 686
replace sdate = 19881008 if idnum == 687
replace sdate = 19881006 if idnum == 692
replace sdate = 19881007 if idnum == 698
replace sdate = 19881006 if idnum == 702
replace sdate = 19881008 if idnum == 710
replace sdate = 19881009 if idnum == 711
replace sdate = 19881012 if idnum == 715
replace sdate = 19881015 if idnum == 720
replace sdate = 19881017 if idnum == 721
replace sdate = 19881025 if idnum == 722
replace sdate = 19881006 if idnum == 725
replace sdate = 19881006 if idnum == 727
replace sdate = 19881006 if idnum == 730
replace sdate = 19881006 if idnum == 731
replace sdate = 19881009 if idnum == 733
replace sdate = 19881006 if idnum == 734
replace sdate = 19881009 if idnum == 736
replace sdate = 19881006 if idnum == 740
replace sdate = 19881006 if idnum == 745
replace sdate = 19881006 if idnum == 755
replace sdate = 19881011 if idnum == 759
replace sdate = 19881006 if idnum == 762
replace sdate = 19881006 if idnum == 766
replace sdate = 19881007 if idnum == 767
replace sdate = 19881006 if idnum == 771
replace sdate = 19881016 if idnum == 775
replace sdate = 19881011 if idnum == 785
replace sdate = 19881006 if idnum == 790
replace sdate = 19881006 if idnum == 797
replace sdate = 19881006 if idnum == 801
replace sdate = 19881007 if idnum == 803
replace sdate = 19881011 if idnum == 808
replace sdate = 19881006 if idnum == 809
replace sdate = 19881006 if idnum == 811
replace sdate = 19881009 if idnum == 816
replace sdate = 19881006 if idnum == 818
replace sdate = 19881006 if idnum == 820
replace sdate = 19881012 if idnum == 827
replace sdate = 19881006 if idnum == 828
replace sdate = 19881006 if idnum == 830
replace sdate = 19881015 if idnum == 831
replace sdate = 19881006 if idnum == 832
replace sdate = 19881009 if idnum == 834
replace sdate = 19881011 if idnum == 838
replace sdate = 19881007 if idnum == 839
replace sdate = 19881014 if idnum == 840
replace sdate = 19881009 if idnum == 855
replace sdate = 19881007 if idnum == 860
replace sdate = 19881007 if idnum == 871
replace sdate = 19881013 if idnum == 872
replace sdate = 19881012 if idnum == 876
replace sdate = 19881012 if idnum == 877
replace sdate = 19881011 if idnum == 878
replace sdate = 19881012 if idnum == 887
replace sdate = 19881011 if idnum == 889
replace sdate = 19881011 if idnum == 899
replace sdate = 19881009 if idnum == 906
replace sdate = 19881007 if idnum == 907
replace sdate = 19881007 if idnum == 912
replace sdate = 19881007 if idnum == 913
replace sdate = 19881008 if idnum == 914
replace sdate = 19881007 if idnum == 917
replace sdate = 19881007 if idnum == 921
replace sdate = 19881009 if idnum == 922
replace sdate = 19881007 if idnum == 924
replace sdate = 19881008 if idnum == 929
replace sdate = 19881007 if idnum == 932
replace sdate = 19881007 if idnum == 933
replace sdate = 19881018 if idnum == 940
replace sdate = 19881007 if idnum == 942
replace sdate = 19881007 if idnum == 943
replace sdate = 19881007 if idnum == 948
replace sdate = 19881017 if idnum == 952
replace sdate = 19881007 if idnum == 954
replace sdate = 19881013 if idnum == 958
replace sdate = 19881007 if idnum == 959
replace sdate = 19881007 if idnum == 960
replace sdate = 19881007 if idnum == 966
replace sdate = 19881011 if idnum == 968
replace sdate = 19881007 if idnum == 969
replace sdate = 19881007 if idnum == 970
replace sdate = 19881007 if idnum == 978
replace sdate = 19881007 if idnum == 982
replace sdate = 19881007 if idnum == 983
replace sdate = 19881008 if idnum == 987
replace sdate = 19881012 if idnum == 988
replace sdate = 19881008 if idnum == 994
replace sdate = 19881007 if idnum == 995
replace sdate = 19881007 if idnum == 1000
replace sdate = 19881016 if idnum == 1007
replace sdate = 19881008 if idnum == 1009
replace sdate = 19881007 if idnum == 1010
replace sdate = 19881013 if idnum == 1012
replace sdate = 19881013 if idnum == 1016
replace sdate = 19881014 if idnum == 1017
replace sdate = 19881008 if idnum == 1021
replace sdate = 19881015 if idnum == 1022
replace sdate = 19881007 if idnum == 1023
replace sdate = 19881015 if idnum == 1025
replace sdate = 19881015 if idnum == 1030
replace sdate = 19881014 if idnum == 1031
replace sdate = 19881016 if idnum == 1032
replace sdate = 19881011 if idnum == 1037
replace sdate = 19881014 if idnum == 1039
replace sdate = 19881011 if idnum == 1053
replace sdate = 19881011 if idnum == 1057
replace sdate = 19881008 if idnum == 1058
replace sdate = 19881007 if idnum == 1063
replace sdate = 19881007 if idnum == 1068
replace sdate = 19881009 if idnum == 1069
replace sdate = 19881011 if idnum == 1070
replace sdate = 19881007 if idnum == 1075
replace sdate = 19881012 if idnum == 1081
replace sdate = 19881008 if idnum == 1082
replace sdate = 19881009 if idnum == 1083
replace sdate = 19881011 if idnum == 1084
replace sdate = 19881008 if idnum == 1085
replace sdate = 19881009 if idnum == 1086
replace sdate = 19881016 if idnum == 1087
replace sdate = 19881007 if idnum == 1088
replace sdate = 19881011 if idnum == 1091
replace sdate = 19881007 if idnum == 1092
replace sdate = 19881007 if idnum == 1094
replace sdate = 19881017 if idnum == 1095
replace sdate = 19881011 if idnum == 1098
replace sdate = 19881012 if idnum == 1104
replace sdate = 19881009 if idnum == 1106
replace sdate = 19881012 if idnum == 1109
replace sdate = 19881007 if idnum == 1123
replace sdate = 19881008 if idnum == 1127
replace sdate = 19881011 if idnum == 1128
replace sdate = 19881007 if idnum == 1133
replace sdate = 19881016 if idnum == 1135
replace sdate = 19881007 if idnum == 1137
replace sdate = 19881015 if idnum == 1138
replace sdate = 19881018 if idnum == 1139
replace sdate = 19881013 if idnum == 1144
replace sdate = 19881011 if idnum == 1160
replace sdate = 19881012 if idnum == 1163
replace sdate = 19881012 if idnum == 1164
replace sdate = 19881013 if idnum == 1168
replace sdate = 19881012 if idnum == 1170
replace sdate = 19881016 if idnum == 1173
replace sdate = 19881011 if idnum == 1176
replace sdate = 19881011 if idnum == 1181
replace sdate = 19881014 if idnum == 1187
replace sdate = 19881015 if idnum == 1189
replace sdate = 19881017 if idnum == 1194
replace sdate = 19881009 if idnum == 1199
replace sdate = 19881009 if idnum == 1200
replace sdate = 19881013 if idnum == 1204
replace sdate = 19881016 if idnum == 1205
replace sdate = 19881009 if idnum == 1207
replace sdate = 19881009 if idnum == 1213
replace sdate = 19881009 if idnum == 1215
replace sdate = 19881013 if idnum == 1217
replace sdate = 19881009 if idnum == 1219
replace sdate = 19881009 if idnum == 1220
replace sdate = 19881013 if idnum == 1228
replace sdate = 19881008 if idnum == 1231
replace sdate = 19881011 if idnum == 1245
replace sdate = 19881009 if idnum == 1247
replace sdate = 19881011 if idnum == 1248
replace sdate = 19881028 if idnum == 1252
replace sdate = 19881011 if idnum == 1255
replace sdate = 19881009 if idnum == 1271
replace sdate = 19881017 if idnum == 1273
replace sdate = 19881009 if idnum == 1278
replace sdate = 19881009 if idnum == 1279
replace sdate = 19881009 if idnum == 1288
replace sdate = 19881011 if idnum == 1290
replace sdate = 19881011 if idnum == 1293
replace sdate = 19881009 if idnum == 1296
replace sdate = 19881020 if idnum == 1298
replace sdate = 19881009 if idnum == 1306
replace sdate = 19881016 if idnum == 1307
replace sdate = 19881009 if idnum == 1312
replace sdate = 19881021 if idnum == 1325
replace sdate = 19881011 if idnum == 1327
replace sdate = 19881009 if idnum == 1345
replace sdate = 19881009 if idnum == 1347
replace sdate = 19881015 if idnum == 1348
replace sdate = 19881017 if idnum == 1355
replace sdate = 19881009 if idnum == 1356
replace sdate = 19881014 if idnum == 1365
replace sdate = 19881009 if idnum == 1368
replace sdate = 19881009 if idnum == 1369
replace sdate = 19881011 if idnum == 1370
replace sdate = 19881013 if idnum == 1371
replace sdate = 19881009 if idnum == 1372
replace sdate = 19881011 if idnum == 1375
replace sdate = 19881009 if idnum == 1386
replace sdate = 19881013 if idnum == 1388
replace sdate = 19881009 if idnum == 1390
replace sdate = 19881009 if idnum == 1391
replace sdate = 19881012 if idnum == 1394
replace sdate = 19881012 if idnum == 1397
replace sdate = 19881016 if idnum == 1401
replace sdate = 19881020 if idnum == 1416
replace sdate = 19881011 if idnum == 1421
replace sdate = 19881014 if idnum == 1424
replace sdate = 19881013 if idnum == 1425
replace sdate = 19881015 if idnum == 1426
replace sdate = 19881009 if idnum == 1427
replace sdate = 19881013 if idnum == 1435
replace sdate = 19881018 if idnum == 1438
replace sdate = 19881011 if idnum == 1440
replace sdate = 19881013 if idnum == 1442
replace sdate = 19881017 if idnum == 1445
replace sdate = 19881014 if idnum == 1446
replace sdate = 19881011 if idnum == 1447
replace sdate = 19881013 if idnum == 1450
replace sdate = 19881016 if idnum == 1454
replace sdate = 19881012 if idnum == 1458
replace sdate = 19881013 if idnum == 1461
replace sdate = 19881011 if idnum == 1466
replace sdate = 19881015 if idnum == 1470
replace sdate = 19881013 if idnum == 1475
replace sdate = 19881011 if idnum == 1477
replace sdate = 19881008 if idnum == 1497
replace sdate = 19881015 if idnum == 1505
replace sdate = 19881008 if idnum == 1507
replace sdate = 19881011 if idnum == 1513
replace sdate = 19881018 if idnum == 1516
replace sdate = 19881011 if idnum == 1518
replace sdate = 19881017 if idnum == 1525
replace sdate = 19881011 if idnum == 1532
replace sdate = 19881012 if idnum == 1537
replace sdate = 19881009 if idnum == 1538
replace sdate = 19881008 if idnum == 1540
replace sdate = 19881008 if idnum == 1543
replace sdate = 19881018 if idnum == 1546
replace sdate = 19881008 if idnum == 1547
replace sdate = 19881012 if idnum == 1552
replace sdate = 19881008 if idnum == 1554
replace sdate = 19881014 if idnum == 1556
replace sdate = 19881008 if idnum == 1557
replace sdate = 19881008 if idnum == 1574
replace sdate = 19881017 if idnum == 1575
replace sdate = 19881016 if idnum == 1576
replace sdate = 19881017 if idnum == 1579
replace sdate = 19881008 if idnum == 1583
replace sdate = 19881009 if idnum == 1597
replace sdate = 19881008 if idnum == 1598
replace sdate = 19881008 if idnum == 1599
replace sdate = 19881016 if idnum == 1602
replace sdate = 19881011 if idnum == 1605
replace sdate = 19881012 if idnum == 1608
replace sdate = 19881011 if idnum == 1612
replace sdate = 19881009 if idnum == 1614
replace sdate = 19881008 if idnum == 1617
replace sdate = 19881008 if idnum == 1620
replace sdate = 19881008 if idnum == 1621
replace sdate = 19881023 if idnum == 1623
replace sdate = 19881008 if idnum == 1625
replace sdate = 19881008 if idnum == 1626
replace sdate = 19881008 if idnum == 1629
replace sdate = 19881008 if idnum == 1632
replace sdate = 19881008 if idnum == 1635
replace sdate = 19881008 if idnum == 1641
replace sdate = 19881008 if idnum == 1642
replace sdate = 19881008 if idnum == 1644
replace sdate = 19881008 if idnum == 1648
replace sdate = 19881011 if idnum == 1651
replace sdate = 19881008 if idnum == 1654
replace sdate = 19881012 if idnum == 1656
replace sdate = 19881008 if idnum == 1666
replace sdate = 19881018 if idnum == 1667
replace sdate = 19881009 if idnum == 1668
replace sdate = 19881011 if idnum == 1671
replace sdate = 19881018 if idnum == 1673
replace sdate = 19881008 if idnum == 1676
replace sdate = 19881012 if idnum == 1677
replace sdate = 19881008 if idnum == 1678
replace sdate = 19881008 if idnum == 1683
replace sdate = 19881009 if idnum == 1685
replace sdate = 19881008 if idnum == 1688
replace sdate = 19881009 if idnum == 1691
replace sdate = 19881008 if idnum == 1692
replace sdate = 19881008 if idnum == 1695
replace sdate = 19881008 if idnum == 1703
replace sdate = 19881008 if idnum == 1705
replace sdate = 19881009 if idnum == 1706
replace sdate = 19881011 if idnum == 1711
replace sdate = 19881008 if idnum == 1712
replace sdate = 19881008 if idnum == 1715
replace sdate = 19881009 if idnum == 1721
replace sdate = 19881018 if idnum == 1722
replace sdate = 19881008 if idnum == 1728
replace sdate = 19881015 if idnum == 1731
replace sdate = 19881008 if idnum == 1735
replace sdate = 19881014 if idnum == 1737
replace sdate = 19881008 if idnum == 1738
replace sdate = 19881008 if idnum == 1739
replace sdate = 19881008 if idnum == 1743
replace sdate = 19881009 if idnum == 1745
replace sdate = 19881009 if idnum == 1746
replace sdate = 19881009 if idnum == 1753
replace sdate = 19881009 if idnum == 1756
replace sdate = 19881018 if idnum == 1761
replace sdate = 19881014 if idnum == 1764
replace sdate = 19881008 if idnum == 1765
replace sdate = 19881009 if idnum == 1771
replace sdate = 19881009 if idnum == 1772
replace sdate = 19881018 if idnum == 1774
replace sdate = 19881015 if idnum == 1782
replace sdate = 19881011 if idnum == 1784
replace sdate = 19881011 if idnum == 1788
replace sdate = 19881012 if idnum == 1790
replace sdate = 19881012 if idnum == 1791
replace sdate = 19881011 if idnum == 1795
replace sdate = 19881011 if idnum == 1799
replace sdate = 19881015 if idnum == 1801
replace sdate = 19881014 if idnum == 1802
replace sdate = 19881012 if idnum == 1803
replace sdate = 19881011 if idnum == 1807
replace sdate = 19881012 if idnum == 1812
replace sdate = 19881011 if idnum == 1813
replace sdate = 19881012 if idnum == 1816
replace sdate = 19881011 if idnum == 1817
replace sdate = 19881011 if idnum == 1819
replace sdate = 19881019 if idnum == 1821
replace sdate = 19881015 if idnum == 1823
replace sdate = 19881011 if idnum == 1825
replace sdate = 19881012 if idnum == 1829
replace sdate = 19881015 if idnum == 1830
replace sdate = 19881011 if idnum == 1833
replace sdate = 19881016 if idnum == 1835
replace sdate = 19881014 if idnum == 1839
replace sdate = 19881019 if idnum == 1840
replace sdate = 19881012 if idnum == 1844
replace sdate = 19881016 if idnum == 1852
replace sdate = 19881015 if idnum == 1863
replace sdate = 19881017 if idnum == 1864
replace sdate = 19881011 if idnum == 1867
replace sdate = 19881014 if idnum == 1869
replace sdate = 19881011 if idnum == 1870
replace sdate = 19881012 if idnum == 1871
replace sdate = 19881011 if idnum == 1884
replace sdate = 19881011 if idnum == 1885
replace sdate = 19881012 if idnum == 1886
replace sdate = 19881011 if idnum == 1890
replace sdate = 19881012 if idnum == 1892
replace sdate = 19881013 if idnum == 1893
replace sdate = 19881012 if idnum == 1897
replace sdate = 19881011 if idnum == 1903
replace sdate = 19881011 if idnum == 1904
replace sdate = 19881013 if idnum == 1917
replace sdate = 19881013 if idnum == 1918
replace sdate = 19881011 if idnum == 1919
replace sdate = 19881018 if idnum == 1920
replace sdate = 19881015 if idnum == 1921
replace sdate = 19881016 if idnum == 1924
replace sdate = 19881012 if idnum == 1928
replace sdate = 19881014 if idnum == 1929
replace sdate = 19881011 if idnum == 1933
replace sdate = 19881016 if idnum == 1935
replace sdate = 19881017 if idnum == 1937
replace sdate = 19881014 if idnum == 1939
replace sdate = 19881012 if idnum == 1940
replace sdate = 19881011 if idnum == 1945
replace sdate = 19881012 if idnum == 1948
replace sdate = 19881014 if idnum == 1949
replace sdate = 19881011 if idnum == 1954
replace sdate = 19881011 if idnum == 1964
replace sdate = 19881012 if idnum == 1967
replace sdate = 19881014 if idnum == 1968
replace sdate = 19881017 if idnum == 1970
replace sdate = 19881011 if idnum == 1972
replace sdate = 19881011 if idnum == 1974
replace sdate = 19881014 if idnum == 1976
replace sdate = 19881015 if idnum == 1980
replace sdate = 19881015 if idnum == 1983
replace sdate = 19881012 if idnum == 1989
replace sdate = 19881011 if idnum == 2000
replace sdate = 19881014 if idnum == 2012
replace sdate = 19881011 if idnum == 2021
replace sdate = 19881011 if idnum == 2029
replace sdate = 19881012 if idnum == 2034
replace sdate = 19881011 if idnum == 2035
replace sdate = 19881011 if idnum == 2037
replace sdate = 19881011 if idnum == 2039
replace sdate = 19881013 if idnum == 2043
replace sdate = 19881011 if idnum == 2047
replace sdate = 19881011 if idnum == 2051
replace sdate = 19881013 if idnum == 2053
replace sdate = 19881011 if idnum == 2060
replace sdate = 19881013 if idnum == 2067
replace sdate = 19881014 if idnum == 2068
replace sdate = 19881023 if idnum == 2069
replace sdate = 19881015 if idnum == 2073
replace sdate = 19881014 if idnum == 2076
replace sdate = 19881013 if idnum == 2078
replace sdate = 19881011 if idnum == 2079
replace sdate = 19881012 if idnum == 2081
replace sdate = 19881012 if idnum == 2098
replace sdate = 19881015 if idnum == 2099
replace sdate = 19881012 if idnum == 2101
replace sdate = 19881013 if idnum == 2105
replace sdate = 19881012 if idnum == 2110
replace sdate = 19881013 if idnum == 2111
replace sdate = 19881014 if idnum == 2117
replace sdate = 19881012 if idnum == 2119
replace sdate = 19881016 if idnum == 2120
replace sdate = 19881014 if idnum == 2121
replace sdate = 19881013 if idnum == 2125
replace sdate = 19881013 if idnum == 2127
replace sdate = 19881012 if idnum == 2134
replace sdate = 19881013 if idnum == 2137
replace sdate = 19881017 if idnum == 2150
replace sdate = 19881012 if idnum == 2152
replace sdate = 19881014 if idnum == 2164
replace sdate = 19881013 if idnum == 2167
replace sdate = 19881012 if idnum == 2170
replace sdate = 19881012 if idnum == 2171
replace sdate = 19881012 if idnum == 2172
replace sdate = 19881019 if idnum == 2173
replace sdate = 19881012 if idnum == 2190
replace sdate = 19881012 if idnum == 2198
replace sdate = 19881012 if idnum == 2201
replace sdate = 19881013 if idnum == 2208
replace sdate = 19881012 if idnum == 2209
replace sdate = 19881013 if idnum == 2210
replace sdate = 19881014 if idnum == 2211
replace sdate = 19881013 if idnum == 2212
replace sdate = 19881016 if idnum == 2222
replace sdate = 19881015 if idnum == 2229
replace sdate = 19881012 if idnum == 2230
replace sdate = 19881012 if idnum == 2231
replace sdate = 19881012 if idnum == 2235
replace sdate = 19881012 if idnum == 2236
replace sdate = 19881019 if idnum == 2237
replace sdate = 19881013 if idnum == 2238
replace sdate = 19881012 if idnum == 2245
replace sdate = 19881012 if idnum == 2247
replace sdate = 19881013 if idnum == 2251
replace sdate = 19881019 if idnum == 2257
replace sdate = 19881012 if idnum == 2258
replace sdate = 19881012 if idnum == 2259
replace sdate = 19881012 if idnum == 2261
replace sdate = 19881012 if idnum == 2262
replace sdate = 19881012 if idnum == 2263
replace sdate = 19881019 if idnum == 2265
replace sdate = 19881012 if idnum == 2266
replace sdate = 19881012 if idnum == 2271
replace sdate = 19881012 if idnum == 2277
replace sdate = 19881012 if idnum == 2287
replace sdate = 19881013 if idnum == 2288
replace sdate = 19881105 if idnum == 2289
replace sdate = 19881012 if idnum == 2297
replace sdate = 19881013 if idnum == 2300
replace sdate = 19881012 if idnum == 2301
replace sdate = 19881013 if idnum == 2302
replace sdate = 19881013 if idnum == 2305
replace sdate = 19881012 if idnum == 2306
replace sdate = 19881012 if idnum == 2307
replace sdate = 19881012 if idnum == 2308
replace sdate = 19881019 if idnum == 2321
replace sdate = 19881012 if idnum == 2330
replace sdate = 19881014 if idnum == 2331
replace sdate = 19881012 if idnum == 2337
replace sdate = 19881012 if idnum == 2341
replace sdate = 19881012 if idnum == 2343
replace sdate = 19881016 if idnum == 2345
replace sdate = 19881012 if idnum == 2348
replace sdate = 19881014 if idnum == 2350
replace sdate = 19881012 if idnum == 2355
replace sdate = 19881012 if idnum == 2358
replace sdate = 19881013 if idnum == 2362
replace sdate = 19881017 if idnum == 2367
replace sdate = 19881012 if idnum == 2368
replace sdate = 19881012 if idnum == 2369
replace sdate = 19881012 if idnum == 2375
replace sdate = 19881015 if idnum == 2376
replace sdate = 19881017 if idnum == 2379
replace sdate = 19881014 if idnum == 2385
replace sdate = 19881019 if idnum == 2388
replace sdate = 19881015 if idnum == 2390
replace sdate = 19881020 if idnum == 2396
replace sdate = 19881013 if idnum == 2398
replace sdate = 19881013 if idnum == 2401
replace sdate = 19881013 if idnum == 2402
replace sdate = 19881017 if idnum == 2406
replace sdate = 19881015 if idnum == 2407
replace sdate = 19881021 if idnum == 2408
replace sdate = 19881013 if idnum == 2409
replace sdate = 19881020 if idnum == 2410
replace sdate = 19881014 if idnum == 2411
replace sdate = 19881016 if idnum == 2414
replace sdate = 19881016 if idnum == 2422
replace sdate = 19881013 if idnum == 2428
replace sdate = 19881017 if idnum == 2430
replace sdate = 19881013 if idnum == 2436
replace sdate = 19881013 if idnum == 2438
replace sdate = 19881019 if idnum == 2441
replace sdate = 19881013 if idnum == 2442
replace sdate = 19881020 if idnum == 2445
replace sdate = 19881013 if idnum == 2453
replace sdate = 19881013 if idnum == 2457
replace sdate = 19881016 if idnum == 2461
replace sdate = 19881019 if idnum == 2471
replace sdate = 19881017 if idnum == 2476
replace sdate = 19881013 if idnum == 2479
replace sdate = 19881014 if idnum == 2486
replace sdate = 19881014 if idnum == 2487
replace sdate = 19881015 if idnum == 2489
replace sdate = 19881013 if idnum == 2492
replace sdate = 19881013 if idnum == 2493
replace sdate = 19881013 if idnum == 2494
replace sdate = 19881013 if idnum == 2498
replace sdate = 19881013 if idnum == 2504
replace sdate = 19881023 if idnum == 2505
replace sdate = 19881017 if idnum == 2506
replace sdate = 19881016 if idnum == 2507
replace sdate = 19881013 if idnum == 2509
replace sdate = 19881014 if idnum == 2510
replace sdate = 19881017 if idnum == 2511
replace sdate = 19881013 if idnum == 2517
replace sdate = 19881014 if idnum == 2518
replace sdate = 19881013 if idnum == 2521
replace sdate = 19881013 if idnum == 2528
replace sdate = 19881014 if idnum == 2532
replace sdate = 19881015 if idnum == 2536
replace sdate = 19881014 if idnum == 2537
replace sdate = 19881024 if idnum == 2539
replace sdate = 19881013 if idnum == 2541
replace sdate = 19881014 if idnum == 2544
replace sdate = 19881017 if idnum == 2545
replace sdate = 19881013 if idnum == 2546
replace sdate = 19881013 if idnum == 2552
replace sdate = 19881013 if idnum == 2557
replace sdate = 19881013 if idnum == 2559
replace sdate = 19881013 if idnum == 2562
replace sdate = 19881013 if idnum == 2563
replace sdate = 19881013 if idnum == 2569
replace sdate = 19881016 if idnum == 2571
replace sdate = 19881018 if idnum == 2572
replace sdate = 19881013 if idnum == 2573
replace sdate = 19881013 if idnum == 2589
replace sdate = 19881019 if idnum == 2592
replace sdate = 19881013 if idnum == 2598
replace sdate = 19881014 if idnum == 2605
replace sdate = 19881013 if idnum == 2606
replace sdate = 19881013 if idnum == 2607
replace sdate = 19881014 if idnum == 2613
replace sdate = 19881015 if idnum == 2619
replace sdate = 19881013 if idnum == 2623
replace sdate = 19881014 if idnum == 2624
replace sdate = 19881017 if idnum == 2633
replace sdate = 19881013 if idnum == 2636
replace sdate = 19881015 if idnum == 2637
replace sdate = 19881013 if idnum == 2640
replace sdate = 19881015 if idnum == 2645
replace sdate = 19881013 if idnum == 2646
replace sdate = 19881013 if idnum == 2648
replace sdate = 19881014 if idnum == 2652
replace sdate = 19881022 if idnum == 2674
replace sdate = 19881017 if idnum == 2676
replace sdate = 19881014 if idnum == 2681
replace sdate = 19881014 if idnum == 2683
replace sdate = 19881014 if idnum == 2685
replace sdate = 19881014 if idnum == 2687
replace sdate = 19881015 if idnum == 2690
replace sdate = 19881014 if idnum == 2695
replace sdate = 19881014 if idnum == 2702
replace sdate = 19881015 if idnum == 2706
replace sdate = 19881014 if idnum == 2708
replace sdate = 19881014 if idnum == 2710
replace sdate = 19881019 if idnum == 2711
replace sdate = 19881017 if idnum == 2713
replace sdate = 19881014 if idnum == 2717
replace sdate = 19881015 if idnum == 2718
replace sdate = 19881014 if idnum == 2721
replace sdate = 19881014 if idnum == 2723
replace sdate = 19881014 if idnum == 2735
replace sdate = 19881014 if idnum == 2743
replace sdate = 19881014 if idnum == 2751
replace sdate = 19881015 if idnum == 2752
replace sdate = 19881014 if idnum == 2754
replace sdate = 19881014 if idnum == 2759
replace sdate = 19881021 if idnum == 2765
replace sdate = 19881014 if idnum == 2769
replace sdate = 19881014 if idnum == 2773
replace sdate = 19881015 if idnum == 2776
replace sdate = 19881017 if idnum == 2780
replace sdate = 19881015 if idnum == 2784
replace sdate = 19881022 if idnum == 2786
replace sdate = 19881014 if idnum == 2791
replace sdate = 19881014 if idnum == 2799
replace sdate = 19881015 if idnum == 2801
replace sdate = 19881016 if idnum == 2808
replace sdate = 19881020 if idnum == 2813
replace sdate = 19881014 if idnum == 2821
replace sdate = 19881015 if idnum == 2826
replace sdate = 19881015 if idnum == 2828
replace sdate = 19881021 if idnum == 2830
replace sdate = 19881014 if idnum == 2831
replace sdate = 19881015 if idnum == 2836
replace sdate = 19881021 if idnum == 2839
replace sdate = 19881014 if idnum == 2840
replace sdate = 19881014 if idnum == 2844
replace sdate = 19881014 if idnum == 2848
replace sdate = 19881014 if idnum == 2849
replace sdate = 19881015 if idnum == 2851
replace sdate = 19881018 if idnum == 2860
replace sdate = 19881023 if idnum == 2864
replace sdate = 19881015 if idnum == 2866
replace sdate = 19881014 if idnum == 2872
replace sdate = 19881014 if idnum == 2880
replace sdate = 19881014 if idnum == 2881
replace sdate = 19881014 if idnum == 2882
replace sdate = 19881014 if idnum == 2886
replace sdate = 19881015 if idnum == 2888
replace sdate = 19881014 if idnum == 2889
replace sdate = 19881023 if idnum == 2892
replace sdate = 19881021 if idnum == 2897
replace sdate = 19881015 if idnum == 2901
replace sdate = 19881014 if idnum == 2902
replace sdate = 19881014 if idnum == 2903
replace sdate = 19881014 if idnum == 2904
replace sdate = 19881017 if idnum == 2905
replace sdate = 19881025 if idnum == 2908
replace sdate = 19881018 if idnum == 2909
replace sdate = 19881016 if idnum == 2910
replace sdate = 19881014 if idnum == 2911
replace sdate = 19881014 if idnum == 2912
replace sdate = 19881020 if idnum == 2913
replace sdate = 19881019 if idnum == 2917
replace sdate = 19881019 if idnum == 2920
replace sdate = 19881016 if idnum == 2921
replace sdate = 19881014 if idnum == 2922
replace sdate = 19881016 if idnum == 2924
replace sdate = 19881016 if idnum == 2925
replace sdate = 19881023 if idnum == 2932
replace sdate = 19881014 if idnum == 2933
replace sdate = 19881014 if idnum == 2934
replace sdate = 19881014 if idnum == 2939
replace sdate = 19881021 if idnum == 2943
replace sdate = 19881021 if idnum == 2944
replace sdate = 19881021 if idnum == 2947
replace sdate = 19881023 if idnum == 2950
replace sdate = 19881015 if idnum == 2976
replace sdate = 19881015 if idnum == 2980
replace sdate = 19881023 if idnum == 2981
replace sdate = 19881015 if idnum == 2989
replace sdate = 19881015 if idnum == 2991
replace sdate = 19881019 if idnum == 2993
replace sdate = 19881016 if idnum == 2996
replace sdate = 19881015 if idnum == 2998
replace sdate = 19881015 if idnum == 3001
replace sdate = 19881015 if idnum == 3017
replace sdate = 19881015 if idnum == 3022
replace sdate = 19881015 if idnum == 3023
replace sdate = 19881015 if idnum == 3024
replace sdate = 19881021 if idnum == 3029
replace sdate = 19881017 if idnum == 3042
replace sdate = 19881021 if idnum == 3048
replace sdate = 19881025 if idnum == 3054
replace sdate = 19881016 if idnum == 3057
replace sdate = 19881016 if idnum == 3058
replace sdate = 19881017 if idnum == 3061
replace sdate = 19881016 if idnum == 3062
replace sdate = 19881016 if idnum == 3070
replace sdate = 19881017 if idnum == 3071
replace sdate = 19881015 if idnum == 3086
replace sdate = 19881015 if idnum == 3088
replace sdate = 19881015 if idnum == 3092
replace sdate = 19881016 if idnum == 3093
replace sdate = 19881016 if idnum == 3097
replace sdate = 19881015 if idnum == 3099
replace sdate = 19881019 if idnum == 3100
replace sdate = 19881015 if idnum == 3103
replace sdate = 19881015 if idnum == 3108
replace sdate = 19881015 if idnum == 3110
replace sdate = 19881015 if idnum == 3111
replace sdate = 19881018 if idnum == 3112
replace sdate = 19881017 if idnum == 3114
replace sdate = 19881018 if idnum == 3118
replace sdate = 19881015 if idnum == 3120
replace sdate = 19881015 if idnum == 3121
replace sdate = 19881015 if idnum == 3122
replace sdate = 19881017 if idnum == 3128
replace sdate = 19881019 if idnum == 3129
replace sdate = 19881015 if idnum == 3132
replace sdate = 19881016 if idnum == 3134
replace sdate = 19881015 if idnum == 3135
replace sdate = 19881015 if idnum == 3140
replace sdate = 19881018 if idnum == 3150
replace sdate = 19881015 if idnum == 3151
replace sdate = 19881015 if idnum == 3153
replace sdate = 19881021 if idnum == 3163
replace sdate = 19881015 if idnum == 3166
replace sdate = 19881015 if idnum == 3167
replace sdate = 19881019 if idnum == 3174
replace sdate = 19881017 if idnum == 3176
replace sdate = 19881020 if idnum == 3177
replace sdate = 19881015 if idnum == 3181
replace sdate = 19881015 if idnum == 3182
replace sdate = 19881015 if idnum == 3185
replace sdate = 19881017 if idnum == 3189
replace sdate = 19881016 if idnum == 3191
replace sdate = 19881015 if idnum == 3194
replace sdate = 19881019 if idnum == 3195
replace sdate = 19881018 if idnum == 3196
replace sdate = 19881015 if idnum == 3197
replace sdate = 19881016 if idnum == 3200
replace sdate = 19881015 if idnum == 3203
replace sdate = 19881023 if idnum == 3208
replace sdate = 19881015 if idnum == 3210
replace sdate = 19881015 if idnum == 3211
replace sdate = 19881015 if idnum == 3213
replace sdate = 19881115 if idnum == 3221
replace sdate = 19881015 if idnum == 3222
replace sdate = 19881019 if idnum == 3223
replace sdate = 19881015 if idnum == 3224
replace sdate = 19881115 if idnum == 3241
replace sdate = 19881022 if idnum == 3268
replace sdate = 19881016 if idnum == 3270
replace sdate = 19881016 if idnum == 3278
replace sdate = 19881017 if idnum == 3283
replace sdate = 19881022 if idnum == 3286
replace sdate = 19881025 if idnum == 3288
replace sdate = 19881019 if idnum == 3289
replace sdate = 19881025 if idnum == 3294
replace sdate = 19881019 if idnum == 3296
replace sdate = 19881016 if idnum == 3297
replace sdate = 19881016 if idnum == 3300
replace sdate = 19881016 if idnum == 3307
replace sdate = 19881018 if idnum == 3308
replace sdate = 19881016 if idnum == 3310
replace sdate = 19881016 if idnum == 3312
replace sdate = 19881016 if idnum == 3316
replace sdate = 19881017 if idnum == 3317
replace sdate = 19881016 if idnum == 3320
replace sdate = 19881016 if idnum == 3321
replace sdate = 19881018 if idnum == 3329
replace sdate = 19881016 if idnum == 3331
replace sdate = 19881016 if idnum == 3344
replace sdate = 19881016 if idnum == 3346
replace sdate = 19881016 if idnum == 3348
replace sdate = 19881016 if idnum == 3349
replace sdate = 19881025 if idnum == 3351
replace sdate = 19881016 if idnum == 3359
replace sdate = 19881016 if idnum == 3365
replace sdate = 19881021 if idnum == 3367
replace sdate = 19881016 if idnum == 3368
replace sdate = 19881016 if idnum == 3370
replace sdate = 19881016 if idnum == 3372
replace sdate = 19881016 if idnum == 3373
replace sdate = 19881016 if idnum == 3378
replace sdate = 19881016 if idnum == 3379
replace sdate = 19881016 if idnum == 3385
replace sdate = 19881016 if idnum == 3386
replace sdate = 19881016 if idnum == 3387
replace sdate = 19881016 if idnum == 3388
replace sdate = 19881016 if idnum == 3389
replace sdate = 19881016 if idnum == 3393
replace sdate = 19881016 if idnum == 3396
replace sdate = 19881016 if idnum == 3397
replace sdate = 19881017 if idnum == 3399
replace sdate = 19881016 if idnum == 3400
replace sdate = 19881018 if idnum == 3401
replace sdate = 19881017 if idnum == 3410
replace sdate = 19881018 if idnum == 3414
replace sdate = 19881020 if idnum == 3416
replace sdate = 19881016 if idnum == 3418
replace sdate = 19881016 if idnum == 3419
replace sdate = 19881016 if idnum == 3423
replace sdate = 19881016 if idnum == 3425
replace sdate = 19881027 if idnum == 3428
replace sdate = 19881016 if idnum == 3430
replace sdate = 19881017 if idnum == 3436
replace sdate = 19881016 if idnum == 3438
replace sdate = 19881016 if idnum == 3441
replace sdate = 19881022 if idnum == 3442
replace sdate = 19881023 if idnum == 3446
replace sdate = 19881016 if idnum == 3449
replace sdate = 19881016 if idnum == 3455
replace sdate = 19881016 if idnum == 3461
replace sdate = 19881019 if idnum == 3462
replace sdate = 19881018 if idnum == 3467
replace sdate = 19881016 if idnum == 3468
replace sdate = 19881016 if idnum == 3470
replace sdate = 19881017 if idnum == 3474
replace sdate = 19881016 if idnum == 3480
replace sdate = 19881018 if idnum == 3481
replace sdate = 19881017 if idnum == 3483
replace sdate = 19881016 if idnum == 3484
replace sdate = 19881016 if idnum == 3486
replace sdate = 19881020 if idnum == 3488
replace sdate = 19881017 if idnum == 3490
replace sdate = 19881016 if idnum == 3496
replace sdate = 19881016 if idnum == 3497
replace sdate = 19881016 if idnum == 3500
replace sdate = 19881016 if idnum == 3505
replace sdate = 19881017 if idnum == 3507
replace sdate = 19881016 if idnum == 3508
replace sdate = 19881017 if idnum == 3509
replace sdate = 19881016 if idnum == 3519
replace sdate = 19881016 if idnum == 3521
replace sdate = 19881018 if idnum == 3522
replace sdate = 19881017 if idnum == 3526
replace sdate = 19881022 if idnum == 3527
replace sdate = 19881017 if idnum == 3528
replace sdate = 19881016 if idnum == 3530
replace sdate = 19881019 if idnum == 3566
replace sdate = 19881026 if idnum == 3567
replace sdate = 19881017 if idnum == 3571
replace sdate = 19881017 if idnum == 3572
replace sdate = 19881018 if idnum == 3579
replace sdate = 19881018 if idnum == 3581
replace sdate = 19881017 if idnum == 3583
replace sdate = 19881019 if idnum == 3584
replace sdate = 19881022 if idnum == 3587
replace sdate = 19881017 if idnum == 3589
replace sdate = 19881021 if idnum == 3595
replace sdate = 19881018 if idnum == 3600
replace sdate = 19881017 if idnum == 3605
replace sdate = 19881017 if idnum == 3613
replace sdate = 19881017 if idnum == 3614
replace sdate = 19881018 if idnum == 3617
replace sdate = 19881018 if idnum == 3621
replace sdate = 19881024 if idnum == 3623
replace sdate = 19881017 if idnum == 3624
replace sdate = 19881022 if idnum == 3625
replace sdate = 19881024 if idnum == 3628
replace sdate = 19881017 if idnum == 3629
replace sdate = 19881018 if idnum == 3632
replace sdate = 19881017 if idnum == 3635
replace sdate = 19881022 if idnum == 3636
replace sdate = 19881023 if idnum == 3638
replace sdate = 19881018 if idnum == 3646
replace sdate = 19881017 if idnum == 3647
replace sdate = 19881017 if idnum == 3652
replace sdate = 19881019 if idnum == 3655
replace sdate = 19881027 if idnum == 3657
replace sdate = 19881018 if idnum == 3659
replace sdate = 19881017 if idnum == 3663
replace sdate = 19881017 if idnum == 3665
replace sdate = 19881018 if idnum == 3669
replace sdate = 19881017 if idnum == 3688
replace sdate = 19881017 if idnum == 3690
replace sdate = 19881017 if idnum == 3695
replace sdate = 19881024 if idnum == 3697
replace sdate = 19881017 if idnum == 3704
replace sdate = 19881017 if idnum == 3705
replace sdate = 19881017 if idnum == 3711
replace sdate = 19881019 if idnum == 3715
replace sdate = 19881028 if idnum == 3716
replace sdate = 19881022 if idnum == 3718
replace sdate = 19881017 if idnum == 3719
replace sdate = 19881017 if idnum == 3722
replace sdate = 19881017 if idnum == 3724
replace sdate = 19881023 if idnum == 3726
replace sdate = 19881018 if idnum == 3728
replace sdate = 19881026 if idnum == 3734
replace sdate = 19881017 if idnum == 3739
replace sdate = 19881017 if idnum == 3753
replace sdate = 19881022 if idnum == 3758
replace sdate = 19881018 if idnum == 3759
replace sdate = 19881019 if idnum == 3760
replace sdate = 19881025 if idnum == 3778
replace sdate = 19881017 if idnum == 3787
replace sdate = 19881017 if idnum == 3788
replace sdate = 19881018 if idnum == 3789
replace sdate = 19881017 if idnum == 3799
replace sdate = 19881018 if idnum == 3800
replace sdate = 19881021 if idnum == 3801
replace sdate = 19881017 if idnum == 3807
replace sdate = 19881017 if idnum == 3808
replace sdate = 19881017 if idnum == 3810
replace sdate = 19881017 if idnum == 3817
replace sdate = 19881017 if idnum == 3819
replace sdate = 19881017 if idnum == 3820
replace sdate = 19881021 if idnum == 3824
replace sdate = 19881021 if idnum == 3826
replace sdate = 19881023 if idnum == 3829
replace sdate = 19881021 if idnum == 3830
replace sdate = 19881026 if idnum == 3837
replace sdate = 19881026 if idnum == 3841
replace sdate = 19881018 if idnum == 3868
replace sdate = 19881019 if idnum == 3872
replace sdate = 19881018 if idnum == 3874
replace sdate = 19881018 if idnum == 3891
replace sdate = 19881019 if idnum == 3896
replace sdate = 19881018 if idnum == 3897
replace sdate = 19881018 if idnum == 3898
replace sdate = 19881020 if idnum == 3899
replace sdate = 19881019 if idnum == 3900
replace sdate = 19881018 if idnum == 3901
replace sdate = 19881018 if idnum == 3905
replace sdate = 19881018 if idnum == 3906
replace sdate = 19881018 if idnum == 3910
replace sdate = 19881018 if idnum == 3913
replace sdate = 19881018 if idnum == 3915
replace sdate = 19881018 if idnum == 3919
replace sdate = 19881021 if idnum == 3921
replace sdate = 19881018 if idnum == 3926
replace sdate = 19881020 if idnum == 3929
replace sdate = 19881018 if idnum == 3937
replace sdate = 19881022 if idnum == 3945
replace sdate = 19881018 if idnum == 3951
replace sdate = 19881020 if idnum == 3955
replace sdate = 19881019 if idnum == 3962
replace sdate = 19881018 if idnum == 3963
replace sdate = 19881024 if idnum == 3965
replace sdate = 19881019 if idnum == 3975
replace sdate = 19881019 if idnum == 3980
replace sdate = 19881018 if idnum == 3986
replace sdate = 19881018 if idnum == 3988
replace sdate = 19881019 if idnum == 3989
replace sdate = 19881020 if idnum == 3990
replace sdate = 19881018 if idnum == 3991
replace sdate = 19881018 if idnum == 3995
replace sdate = 19881020 if idnum == 3999
replace sdate = 19881018 if idnum == 4001
replace sdate = 19881019 if idnum == 4006
replace sdate = 19881018 if idnum == 4008
replace sdate = 19881018 if idnum == 4012
replace sdate = 19881018 if idnum == 4020
replace sdate = 19881018 if idnum == 4028
replace sdate = 19881018 if idnum == 4030
replace sdate = 19881027 if idnum == 4033
replace sdate = 19881019 if idnum == 4039
replace sdate = 19881018 if idnum == 4043
replace sdate = 19881018 if idnum == 4053
replace sdate = 19881018 if idnum == 4056
replace sdate = 19881018 if idnum == 4060
replace sdate = 19881018 if idnum == 4064
replace sdate = 19881021 if idnum == 4073
replace sdate = 19881018 if idnum == 4074
replace sdate = 19881018 if idnum == 4078
replace sdate = 19881018 if idnum == 4083
replace sdate = 19881022 if idnum == 4088
replace sdate = 19881018 if idnum == 4089
replace sdate = 19881020 if idnum == 4092
replace sdate = 19881019 if idnum == 4094
replace sdate = 19881018 if idnum == 4097
replace sdate = 19881019 if idnum == 4102
replace sdate = 19881018 if idnum == 4104
replace sdate = 19881023 if idnum == 4110
replace sdate = 19881018 if idnum == 4112
replace sdate = 19881019 if idnum == 4114
replace sdate = 19881018 if idnum == 4116
replace sdate = 19881024 if idnum == 4122
replace sdate = 19881018 if idnum == 4123
replace sdate = 19881021 if idnum == 4128
replace sdate = 19881026 if idnum == 4129
replace sdate = 19881026 if idnum == 4134
replace sdate = 19881026 if idnum == 4137
replace sdate = 19881023 if idnum == 4159
replace sdate = 19881019 if idnum == 4162
replace sdate = 19881019 if idnum == 4166
replace sdate = 19881019 if idnum == 4167
replace sdate = 19881020 if idnum == 4168
replace sdate = 19881019 if idnum == 4170
replace sdate = 19881020 if idnum == 4172
replace sdate = 19881030 if idnum == 4177
replace sdate = 19881019 if idnum == 4179
replace sdate = 19881019 if idnum == 4182
replace sdate = 19881030 if idnum == 4186
replace sdate = 19881019 if idnum == 4190
replace sdate = 19881020 if idnum == 4202
replace sdate = 19881019 if idnum == 4210
replace sdate = 19881021 if idnum == 4215
replace sdate = 19881019 if idnum == 4219
replace sdate = 19881022 if idnum == 4220
replace sdate = 19881026 if idnum == 4222
replace sdate = 19881028 if idnum == 4224
replace sdate = 19881019 if idnum == 4225
replace sdate = 19881019 if idnum == 4226
replace sdate = 19881019 if idnum == 4229
replace sdate = 19881020 if idnum == 4230
replace sdate = 19881019 if idnum == 4231
replace sdate = 19881019 if idnum == 4234
replace sdate = 19881019 if idnum == 4235
replace sdate = 19881024 if idnum == 4237
replace sdate = 19881019 if idnum == 4238
replace sdate = 19881021 if idnum == 4239
replace sdate = 19881019 if idnum == 4247
replace sdate = 19881019 if idnum == 4248
replace sdate = 19881020 if idnum == 4249
replace sdate = 19881023 if idnum == 4250
replace sdate = 19881019 if idnum == 4256
replace sdate = 19881019 if idnum == 4262
replace sdate = 19881019 if idnum == 4266
replace sdate = 19881019 if idnum == 4270
replace sdate = 19881020 if idnum == 4271
replace sdate = 19881019 if idnum == 4272
replace sdate = 19881019 if idnum == 4273
replace sdate = 19881019 if idnum == 4275
replace sdate = 19881019 if idnum == 4277
replace sdate = 19881020 if idnum == 4279
replace sdate = 19881019 if idnum == 4291
replace sdate = 19881019 if idnum == 4293
replace sdate = 19881021 if idnum == 4297
replace sdate = 19881019 if idnum == 4300
replace sdate = 19881024 if idnum == 4301
replace sdate = 19881019 if idnum == 4304
replace sdate = 19881022 if idnum == 4305
replace sdate = 19881019 if idnum == 4306
replace sdate = 19881019 if idnum == 4309
replace sdate = 19881019 if idnum == 4310
replace sdate = 19881022 if idnum == 4311
replace sdate = 19881020 if idnum == 4313
replace sdate = 19881019 if idnum == 4316
replace sdate = 19881028 if idnum == 4318
replace sdate = 19881019 if idnum == 4319
replace sdate = 19881024 if idnum == 4322
replace sdate = 19881020 if idnum == 4324
replace sdate = 19881019 if idnum == 4325
replace sdate = 19881020 if idnum == 4327
replace sdate = 19881023 if idnum == 4331
replace sdate = 19881020 if idnum == 4335
replace sdate = 19881019 if idnum == 4357
replace sdate = 19881019 if idnum == 4358
replace sdate = 19881028 if idnum == 4359
replace sdate = 19881030 if idnum == 4364
replace sdate = 19881019 if idnum == 4365
replace sdate = 19881022 if idnum == 4369
replace sdate = 19881019 if idnum == 4373
replace sdate = 19881020 if idnum == 4383
replace sdate = 19881019 if idnum == 4386
replace sdate = 19881020 if idnum == 4387
replace sdate = 19881019 if idnum == 4388
replace sdate = 19881019 if idnum == 4390
replace sdate = 19881020 if idnum == 4399
replace sdate = 19881019 if idnum == 4400
replace sdate = 19881019 if idnum == 4403
replace sdate = 19881020 if idnum == 4418
replace sdate = 19881019 if idnum == 4425
replace sdate = 19881021 if idnum == 4458
replace sdate = 19881026 if idnum == 4461
replace sdate = 19881020 if idnum == 4464
replace sdate = 19881021 if idnum == 4472
replace sdate = 19881022 if idnum == 4477
replace sdate = 19881020 if idnum == 4478
replace sdate = 19881021 if idnum == 4482
replace sdate = 19881020 if idnum == 4484
replace sdate = 19881020 if idnum == 4486
replace sdate = 19881021 if idnum == 4490
replace sdate = 19881030 if idnum == 4491
replace sdate = 19881020 if idnum == 4492
replace sdate = 19881020 if idnum == 4500
replace sdate = 19881021 if idnum == 4505
replace sdate = 19881020 if idnum == 4506
replace sdate = 19881021 if idnum == 4508
replace sdate = 19881023 if idnum == 4511
replace sdate = 19881028 if idnum == 4513
replace sdate = 19881030 if idnum == 4516
replace sdate = 19881020 if idnum == 4520
replace sdate = 19881020 if idnum == 4522
replace sdate = 19881021 if idnum == 4523
replace sdate = 19881020 if idnum == 4529
replace sdate = 19881028 if idnum == 4531
replace sdate = 19881021 if idnum == 4537
replace sdate = 19881028 if idnum == 4538
replace sdate = 19881021 if idnum == 4540
replace sdate = 19881023 if idnum == 4554
replace sdate = 19881020 if idnum == 4565
replace sdate = 19881026 if idnum == 4567
replace sdate = 19881020 if idnum == 4568
replace sdate = 19881021 if idnum == 4570
replace sdate = 19881020 if idnum == 4572
replace sdate = 19881023 if idnum == 4574
replace sdate = 19881025 if idnum == 4575
replace sdate = 19881020 if idnum == 4578
replace sdate = 19881020 if idnum == 4579
replace sdate = 19881023 if idnum == 4584
replace sdate = 19881021 if idnum == 4586
replace sdate = 19881020 if idnum == 4589
replace sdate = 19881021 if idnum == 4599
replace sdate = 19881023 if idnum == 4608
replace sdate = 19881021 if idnum == 4609
replace sdate = 19881030 if idnum == 4620
replace sdate = 19881022 if idnum == 4623
replace sdate = 19881024 if idnum == 4626
replace sdate = 19881021 if idnum == 4632
replace sdate = 19881023 if idnum == 4639
replace sdate = 19881020 if idnum == 4643
replace sdate = 19881020 if idnum == 4644
replace sdate = 19881021 if idnum == 4649
replace sdate = 19881024 if idnum == 4653
replace sdate = 19881020 if idnum == 4654
replace sdate = 19881021 if idnum == 4657
replace sdate = 19881022 if idnum == 4661
replace sdate = 19881023 if idnum == 4665
replace sdate = 19881021 if idnum == 4669
replace sdate = 19881020 if idnum == 4672
replace sdate = 19881021 if idnum == 4674
replace sdate = 19881020 if idnum == 4676
replace sdate = 19881026 if idnum == 4678
replace sdate = 19881020 if idnum == 4680
replace sdate = 19881021 if idnum == 4681
replace sdate = 19881020 if idnum == 4682
replace sdate = 19881021 if idnum == 4688
replace sdate = 19881020 if idnum == 4693
replace sdate = 19881020 if idnum == 4705
replace sdate = 19881020 if idnum == 4710
replace sdate = 19881029 if idnum == 4711
replace sdate = 19881021 if idnum == 4713
replace sdate = 19881022 if idnum == 4717
replace sdate = 19881026 if idnum == 4719
replace sdate = 19881021 if idnum == 4761
replace sdate = 19881021 if idnum == 4763
replace sdate = 19881027 if idnum == 4769
replace sdate = 19881024 if idnum == 4774
replace sdate = 19881021 if idnum == 4776
replace sdate = 19881022 if idnum == 4783
replace sdate = 19881021 if idnum == 4789
replace sdate = 19881026 if idnum == 4791
replace sdate = 19881021 if idnum == 4792
replace sdate = 19881023 if idnum == 4795
replace sdate = 19881030 if idnum == 4796
replace sdate = 19881021 if idnum == 4801
replace sdate = 19881026 if idnum == 4802
replace sdate = 19881021 if idnum == 4804
replace sdate = 19881021 if idnum == 4807
replace sdate = 19881021 if idnum == 4809
replace sdate = 19881021 if idnum == 4811
replace sdate = 19881021 if idnum == 4812
replace sdate = 19881023 if idnum == 4814
replace sdate = 19881021 if idnum == 4821
replace sdate = 19881022 if idnum == 4826
replace sdate = 19881021 if idnum == 4833
replace sdate = 19881103 if idnum == 4835
replace sdate = 19881023 if idnum == 4842
replace sdate = 19881023 if idnum == 4843
replace sdate = 19881021 if idnum == 4845
replace sdate = 19881023 if idnum == 4850
replace sdate = 19881020 if idnum == 4852
replace sdate = 19881021 if idnum == 4855
replace sdate = 19881022 if idnum == 4859
replace sdate = 19881021 if idnum == 4861
replace sdate = 19881022 if idnum == 4863
replace sdate = 19881021 if idnum == 4865
replace sdate = 19881021 if idnum == 4867
replace sdate = 19881021 if idnum == 4868
replace sdate = 19881022 if idnum == 4872
replace sdate = 19881021 if idnum == 4879
replace sdate = 19881023 if idnum == 4880
replace sdate = 19881025 if idnum == 4882
replace sdate = 19881023 if idnum == 4884
replace sdate = 19881021 if idnum == 4885
replace sdate = 19881027 if idnum == 4888
replace sdate = 19881020 if idnum == 4891
replace sdate = 19881021 if idnum == 4893
replace sdate = 19881021 if idnum == 4895
replace sdate = 19881022 if idnum == 4897
replace sdate = 19881021 if idnum == 4902
replace sdate = 19881025 if idnum == 4905
replace sdate = 19881021 if idnum == 4909
replace sdate = 19881021 if idnum == 4919
replace sdate = 19881021 if idnum == 4921
replace sdate = 19881021 if idnum == 4923
replace sdate = 19881021 if idnum == 4928
replace sdate = 19881020 if idnum == 4931
replace sdate = 19881021 if idnum == 4933
replace sdate = 19881023 if idnum == 4944
replace sdate = 19881023 if idnum == 4945
replace sdate = 19881022 if idnum == 4950
replace sdate = 19881021 if idnum == 4951
replace sdate = 19881021 if idnum == 4960
replace sdate = 19881023 if idnum == 4962
replace sdate = 19881021 if idnum == 4964
replace sdate = 19881022 if idnum == 4966
replace sdate = 19881021 if idnum == 4975
replace sdate = 19881021 if idnum == 4978
replace sdate = 19881021 if idnum == 4979
replace sdate = 19881102 if idnum == 4988
replace sdate = 19881021 if idnum == 5008
replace sdate = 19881101 if idnum == 5016
replace sdate = 19881101 if idnum == 5018
replace sdate = 19881025 if idnum == 5050
replace sdate = 19881022 if idnum == 5052
replace sdate = 19881023 if idnum == 5060
replace sdate = 19881022 if idnum == 5061
replace sdate = 19881102 if idnum == 5064
replace sdate = 19881022 if idnum == 5067
replace sdate = 19881022 if idnum == 5068
replace sdate = 19881022 if idnum == 5070
replace sdate = 19881022 if idnum == 5072
replace sdate = 19881024 if idnum == 5075
replace sdate = 19881022 if idnum == 5077
replace sdate = 19881027 if idnum == 5078
replace sdate = 19881022 if idnum == 5081
replace sdate = 19881022 if idnum == 5083
replace sdate = 19881030 if idnum == 5088
replace sdate = 19881022 if idnum == 5089
replace sdate = 19881102 if idnum == 5090
replace sdate = 19881022 if idnum == 5091
replace sdate = 19881025 if idnum == 5092
replace sdate = 19881022 if idnum == 5093
replace sdate = 19881022 if idnum == 5098
replace sdate = 19881022 if idnum == 5107
replace sdate = 19881028 if idnum == 5108
replace sdate = 19881022 if idnum == 5113
replace sdate = 19881022 if idnum == 5114
replace sdate = 19881024 if idnum == 5115
replace sdate = 19881022 if idnum == 5116
replace sdate = 19881022 if idnum == 5119
replace sdate = 19881026 if idnum == 5120
replace sdate = 19881022 if idnum == 5121
replace sdate = 19881022 if idnum == 5126
replace sdate = 19881023 if idnum == 5127
replace sdate = 19881022 if idnum == 5134
replace sdate = 19881022 if idnum == 5138
replace sdate = 19881023 if idnum == 5141
replace sdate = 19881022 if idnum == 5144
replace sdate = 19881023 if idnum == 5146
replace sdate = 19881022 if idnum == 5148
replace sdate = 19881023 if idnum == 5149
replace sdate = 19881022 if idnum == 5156
replace sdate = 19881023 if idnum == 5158
replace sdate = 19881022 if idnum == 5160
replace sdate = 19881023 if idnum == 5161
replace sdate = 19881025 if idnum == 5162
replace sdate = 19881022 if idnum == 5164
replace sdate = 19881022 if idnum == 5166
replace sdate = 19881026 if idnum == 5170
replace sdate = 19881022 if idnum == 5177
replace sdate = 19881023 if idnum == 5185
replace sdate = 19881022 if idnum == 5187
replace sdate = 19881022 if idnum == 5191
replace sdate = 19881026 if idnum == 5194
replace sdate = 19881024 if idnum == 5199
replace sdate = 19881025 if idnum == 5201
replace sdate = 19881022 if idnum == 5202
replace sdate = 19881023 if idnum == 5207
replace sdate = 19881022 if idnum == 5208
replace sdate = 19881023 if idnum == 5215
replace sdate = 19881031 if idnum == 5219
replace sdate = 19881022 if idnum == 5224
replace sdate = 19881022 if idnum == 5228
replace sdate = 19881022 if idnum == 5230
replace sdate = 19881022 if idnum == 5233
replace sdate = 19881022 if idnum == 5236
replace sdate = 19881022 if idnum == 5244
replace sdate = 19881022 if idnum == 5246
replace sdate = 19881102 if idnum == 5249
replace sdate = 19881022 if idnum == 5250
replace sdate = 19881023 if idnum == 5251
replace sdate = 19881026 if idnum == 5252
replace sdate = 19881022 if idnum == 5257
replace sdate = 19881022 if idnum == 5259
replace sdate = 19881022 if idnum == 5262
replace sdate = 19881022 if idnum == 5263
replace sdate = 19881022 if idnum == 5264
replace sdate = 19881022 if idnum == 5270
replace sdate = 19881022 if idnum == 5273
replace sdate = 19881027 if idnum == 5275
replace sdate = 19881023 if idnum == 5284
replace sdate = 19881024 if idnum == 5288
replace sdate = 19881023 if idnum == 5291
replace sdate = 19881022 if idnum == 5295
replace sdate = 19881115 if idnum == 5299
replace sdate = 19881025 if idnum == 5301
replace sdate = 19881029 if idnum == 5305
replace sdate = 19881101 if idnum == 5306
replace sdate = 19881022 if idnum == 5307
replace sdate = 19881022 if idnum == 5310
replace sdate = 19881022 if idnum == 5311
replace sdate = 19881118 if idnum == 5339
replace sdate = 19881025 if idnum == 5347
replace sdate = 19881029 if idnum == 5353
replace sdate = 19881023 if idnum == 5365
replace sdate = 19881023 if idnum == 5373
replace sdate = 19881101 if idnum == 5376
replace sdate = 19881023 if idnum == 5377
replace sdate = 19881023 if idnum == 5378
replace sdate = 19881023 if idnum == 5381
replace sdate = 19881023 if idnum == 5382
replace sdate = 19881024 if idnum == 5389
replace sdate = 19881023 if idnum == 5393
replace sdate = 19881023 if idnum == 5394
replace sdate = 19881031 if idnum == 5398
replace sdate = 19881023 if idnum == 5399
replace sdate = 19881023 if idnum == 5402
replace sdate = 19881023 if idnum == 5403
replace sdate = 19881027 if idnum == 5406
replace sdate = 19881023 if idnum == 5409
replace sdate = 19881025 if idnum == 5410
replace sdate = 19881023 if idnum == 5413
replace sdate = 19881031 if idnum == 5414
replace sdate = 19881023 if idnum == 5423
replace sdate = 19881023 if idnum == 5427
replace sdate = 19881027 if idnum == 5429
replace sdate = 19881023 if idnum == 5430
replace sdate = 19881031 if idnum == 5432
replace sdate = 19881023 if idnum == 5434
replace sdate = 19881023 if idnum == 5439
replace sdate = 19881023 if idnum == 5443
replace sdate = 19881024 if idnum == 5444
replace sdate = 19881023 if idnum == 5451
replace sdate = 19881023 if idnum == 5458
replace sdate = 19881024 if idnum == 5460
replace sdate = 19881023 if idnum == 5463
replace sdate = 19881023 if idnum == 5465
replace sdate = 19881023 if idnum == 5470
replace sdate = 19881103 if idnum == 5473
replace sdate = 19881023 if idnum == 5479
replace sdate = 19881023 if idnum == 5481
replace sdate = 19881023 if idnum == 5484
replace sdate = 19881024 if idnum == 5487
replace sdate = 19881028 if idnum == 5492
replace sdate = 19881026 if idnum == 5493
replace sdate = 19881025 if idnum == 5494
replace sdate = 19881023 if idnum == 5495
replace sdate = 19881026 if idnum == 5502
replace sdate = 19881023 if idnum == 5504
replace sdate = 19881025 if idnum == 5507
replace sdate = 19881025 if idnum == 5511
replace sdate = 19881023 if idnum == 5512
replace sdate = 19881103 if idnum == 5516
replace sdate = 19881024 if idnum == 5519
replace sdate = 19881025 if idnum == 5524
replace sdate = 19881030 if idnum == 5532
replace sdate = 19881023 if idnum == 5534
replace sdate = 19881023 if idnum == 5535
replace sdate = 19881023 if idnum == 5540
replace sdate = 19881023 if idnum == 5544
replace sdate = 19881024 if idnum == 5547
replace sdate = 19881023 if idnum == 5548
replace sdate = 19881023 if idnum == 5552
replace sdate = 19881023 if idnum == 5555
replace sdate = 19881024 if idnum == 5557
replace sdate = 19881023 if idnum == 5559
replace sdate = 19881103 if idnum == 5563
replace sdate = 19881023 if idnum == 5564
replace sdate = 19881026 if idnum == 5568
replace sdate = 19881102 if idnum == 5575
replace sdate = 19881023 if idnum == 5577
replace sdate = 19881024 if idnum == 5582
replace sdate = 19881103 if idnum == 5583
replace sdate = 19881023 if idnum == 5588
replace sdate = 19881023 if idnum == 5594
replace sdate = 19881024 if idnum == 5596
replace sdate = 19881026 if idnum == 5605
replace sdate = 19881023 if idnum == 5609
replace sdate = 19881030 if idnum == 5610
replace sdate = 19881025 if idnum == 5644
replace sdate = 19881027 if idnum == 5647
replace sdate = 19881024 if idnum == 5648
replace sdate = 19881024 if idnum == 5649
replace sdate = 19881026 if idnum == 5651
replace sdate = 19881024 if idnum == 5653
replace sdate = 19881104 if idnum == 5659
replace sdate = 19881024 if idnum == 5660
replace sdate = 19881024 if idnum == 5661
replace sdate = 19881024 if idnum == 5666
replace sdate = 19881025 if idnum == 5667
replace sdate = 19881024 if idnum == 5668
replace sdate = 19881025 if idnum == 5669
replace sdate = 19881025 if idnum == 5672
replace sdate = 19881025 if idnum == 5675
replace sdate = 19881028 if idnum == 5680
replace sdate = 19881028 if idnum == 5681
replace sdate = 19881026 if idnum == 5685
replace sdate = 19881101 if idnum == 5688
replace sdate = 19881027 if idnum == 5691
replace sdate = 19881024 if idnum == 5693
replace sdate = 19881027 if idnum == 5698
replace sdate = 19881104 if idnum == 5703
replace sdate = 19881027 if idnum == 5704
replace sdate = 19881024 if idnum == 5711
replace sdate = 19881024 if idnum == 5712
replace sdate = 19881031 if idnum == 5713
replace sdate = 19881024 if idnum == 5716
replace sdate = 19881024 if idnum == 5718
replace sdate = 19881024 if idnum == 5722
replace sdate = 19881024 if idnum == 5724
replace sdate = 19881024 if idnum == 5729
replace sdate = 19881026 if idnum == 5730
replace sdate = 19881026 if idnum == 5735
replace sdate = 19881024 if idnum == 5736
replace sdate = 19881030 if idnum == 5740
replace sdate = 19881024 if idnum == 5742
replace sdate = 19881025 if idnum == 5745
replace sdate = 19881024 if idnum == 5746
replace sdate = 19881031 if idnum == 5748
replace sdate = 19881028 if idnum == 5749
replace sdate = 19881026 if idnum == 5751
replace sdate = 19881024 if idnum == 5752
replace sdate = 19881026 if idnum == 5754
replace sdate = 19881026 if idnum == 5755
replace sdate = 19881024 if idnum == 5758
replace sdate = 19881028 if idnum == 5761
replace sdate = 19881024 if idnum == 5762
replace sdate = 19881024 if idnum == 5765
replace sdate = 19881025 if idnum == 5774
replace sdate = 19881026 if idnum == 5779
replace sdate = 19881031 if idnum == 5781
replace sdate = 19881024 if idnum == 5785
replace sdate = 19881026 if idnum == 5790
replace sdate = 19881026 if idnum == 5794
replace sdate = 19881026 if idnum == 5799
replace sdate = 19881024 if idnum == 5801
replace sdate = 19881027 if idnum == 5803
replace sdate = 19881026 if idnum == 5807
replace sdate = 19881028 if idnum == 5808
replace sdate = 19881024 if idnum == 5811
replace sdate = 19881024 if idnum == 5813
replace sdate = 19881024 if idnum == 5814
replace sdate = 19881024 if idnum == 5817
replace sdate = 19881024 if idnum == 5818
replace sdate = 19881027 if idnum == 5819
replace sdate = 19881025 if idnum == 5820
replace sdate = 19881101 if idnum == 5824
replace sdate = 19881024 if idnum == 5828
replace sdate = 19881106 if idnum == 5836
replace sdate = 19881028 if idnum == 5843
replace sdate = 19881026 if idnum == 5844
replace sdate = 19881024 if idnum == 5846
replace sdate = 19881024 if idnum == 5851
replace sdate = 19881025 if idnum == 5852
replace sdate = 19881026 if idnum == 5854
replace sdate = 19881024 if idnum == 5860
replace sdate = 19881025 if idnum == 5863
replace sdate = 19881025 if idnum == 5864
replace sdate = 19881024 if idnum == 5865
replace sdate = 19881025 if idnum == 5874
replace sdate = 19881025 if idnum == 5878
replace sdate = 19881024 if idnum == 5879
replace sdate = 19881026 if idnum == 5880
replace sdate = 19881026 if idnum == 5882
replace sdate = 19881101 if idnum == 5885
replace sdate = 19881028 if idnum == 5889
replace sdate = 19881026 if idnum == 5894
replace sdate = 19881025 if idnum == 5897
replace sdate = 19881025 if idnum == 5899
replace sdate = 19881029 if idnum == 5902
replace sdate = 19881103 if idnum == 5904
replace sdate = 19881025 if idnum == 5910
replace sdate = 19881029 if idnum == 5942
replace sdate = 19881025 if idnum == 5945
replace sdate = 19881025 if idnum == 5949
replace sdate = 19881025 if idnum == 5951
replace sdate = 19881101 if idnum == 5953
replace sdate = 19881025 if idnum == 5956
replace sdate = 19881025 if idnum == 5959
replace sdate = 19881025 if idnum == 5965
replace sdate = 19881025 if idnum == 5969
replace sdate = 19881026 if idnum == 5981
replace sdate = 19881101 if idnum == 5993
replace sdate = 19881025 if idnum == 5994
replace sdate = 19881026 if idnum == 6001
replace sdate = 19881027 if idnum == 6011
replace sdate = 19881025 if idnum == 6013
replace sdate = 19881025 if idnum == 6020
replace sdate = 19881028 if idnum == 6030
replace sdate = 19881025 if idnum == 6031
replace sdate = 19881025 if idnum == 6032
replace sdate = 19881029 if idnum == 6046
replace sdate = 19881028 if idnum == 6049
replace sdate = 19881025 if idnum == 6050
replace sdate = 19881025 if idnum == 6051
replace sdate = 19881030 if idnum == 6052
replace sdate = 19881025 if idnum == 6054
replace sdate = 19881102 if idnum == 6060
replace sdate = 19881025 if idnum == 6061
replace sdate = 19881027 if idnum == 6064
replace sdate = 19881025 if idnum == 6065
replace sdate = 19881025 if idnum == 6066
replace sdate = 19881026 if idnum == 6067
replace sdate = 19881026 if idnum == 6070
replace sdate = 19881031 if idnum == 6073
replace sdate = 19881025 if idnum == 6083
replace sdate = 19881029 if idnum == 6085
replace sdate = 19881025 if idnum == 6087
replace sdate = 19881025 if idnum == 6088
replace sdate = 19881026 if idnum == 6090
replace sdate = 19881025 if idnum == 6092
replace sdate = 19881025 if idnum == 6099
replace sdate = 19881026 if idnum == 6100
replace sdate = 19881031 if idnum == 6104
replace sdate = 19881025 if idnum == 6109
replace sdate = 19881031 if idnum == 6114
replace sdate = 19881025 if idnum == 6116
replace sdate = 19881028 if idnum == 6120
replace sdate = 19881025 if idnum == 6124
replace sdate = 19881031 if idnum == 6125
replace sdate = 19881025 if idnum == 6126
replace sdate = 19881028 if idnum == 6127
replace sdate = 19881025 if idnum == 6131
replace sdate = 19881026 if idnum == 6134
replace sdate = 19881025 if idnum == 6137
replace sdate = 19881103 if idnum == 6141
replace sdate = 19881025 if idnum == 6143
replace sdate = 19881026 if idnum == 6146
replace sdate = 19881025 if idnum == 6151
replace sdate = 19881102 if idnum == 6155
replace sdate = 19881028 if idnum == 6156
replace sdate = 19881027 if idnum == 6162
replace sdate = 19881026 if idnum == 6163
replace sdate = 19881025 if idnum == 6172
replace sdate = 19881025 if idnum == 6173
replace sdate = 19881025 if idnum == 6174
replace sdate = 19881025 if idnum == 6176
replace sdate = 19881026 if idnum == 6177
replace sdate = 19881025 if idnum == 6178
replace sdate = 19881029 if idnum == 6184
replace sdate = 19881025 if idnum == 6189
replace sdate = 19881028 if idnum == 6191
replace sdate = 19881025 if idnum == 6198
replace sdate = 19881026 if idnum == 6199
replace sdate = 19881104 if idnum == 6200
replace sdate = 19881026 if idnum == 6203
replace sdate = 19881115 if idnum == 6220
replace sdate = 19881026 if idnum == 6238
replace sdate = 19881026 if idnum == 6239
replace sdate = 19881026 if idnum == 6245
replace sdate = 19881027 if idnum == 6250
replace sdate = 19881026 if idnum == 6253
replace sdate = 19881026 if idnum == 6255
replace sdate = 19881027 if idnum == 6257
replace sdate = 19881031 if idnum == 6259
replace sdate = 19881030 if idnum == 6261
replace sdate = 19881103 if idnum == 6265
replace sdate = 19881028 if idnum == 6267
replace sdate = 19881027 if idnum == 6269
replace sdate = 19881026 if idnum == 6275
replace sdate = 19881026 if idnum == 6277
replace sdate = 19881101 if idnum == 6279
replace sdate = 19881026 if idnum == 6285
replace sdate = 19881026 if idnum == 6287
replace sdate = 19881030 if idnum == 6292
replace sdate = 19881026 if idnum == 6293
replace sdate = 19881027 if idnum == 6299
replace sdate = 19881026 if idnum == 6301
replace sdate = 19881026 if idnum == 6305
replace sdate = 19881026 if idnum == 6306
replace sdate = 19881028 if idnum == 6307
replace sdate = 19881102 if idnum == 6308
replace sdate = 19881026 if idnum == 6310
replace sdate = 19881027 if idnum == 6313
replace sdate = 19881026 if idnum == 6315
replace sdate = 19881028 if idnum == 6316
replace sdate = 19881026 if idnum == 6321
replace sdate = 19881026 if idnum == 6323
replace sdate = 19881026 if idnum == 6327
replace sdate = 19881028 if idnum == 6330
replace sdate = 19881026 if idnum == 6336
replace sdate = 19881026 if idnum == 6337
replace sdate = 19881026 if idnum == 6339
replace sdate = 19881026 if idnum == 6340
replace sdate = 19881105 if idnum == 6341
replace sdate = 19881106 if idnum == 6343
replace sdate = 19881026 if idnum == 6344
replace sdate = 19881030 if idnum == 6346
replace sdate = 19881031 if idnum == 6357
replace sdate = 19881102 if idnum == 6358
replace sdate = 19881026 if idnum == 6359
replace sdate = 19881026 if idnum == 6361
replace sdate = 19881026 if idnum == 6365
replace sdate = 19881101 if idnum == 6369
replace sdate = 19881026 if idnum == 6370
replace sdate = 19881101 if idnum == 6372
replace sdate = 19881027 if idnum == 6373
replace sdate = 19881026 if idnum == 6375
replace sdate = 19881027 if idnum == 6376
replace sdate = 19881029 if idnum == 6382
replace sdate = 19881026 if idnum == 6383
replace sdate = 19881027 if idnum == 6385
replace sdate = 19881026 if idnum == 6387
replace sdate = 19881026 if idnum == 6395
replace sdate = 19881028 if idnum == 6397
replace sdate = 19881026 if idnum == 6403
replace sdate = 19881026 if idnum == 6406
replace sdate = 19881026 if idnum == 6409
replace sdate = 19881026 if idnum == 6413
replace sdate = 19881031 if idnum == 6415
replace sdate = 19881103 if idnum == 6416
replace sdate = 19881028 if idnum == 6422
replace sdate = 19881026 if idnum == 6424
replace sdate = 19881030 if idnum == 6432
replace sdate = 19881026 if idnum == 6436
replace sdate = 19881026 if idnum == 6439
replace sdate = 19881030 if idnum == 6441
replace sdate = 19881027 if idnum == 6445
replace sdate = 19881026 if idnum == 6449
replace sdate = 19881029 if idnum == 6454
replace sdate = 19881026 if idnum == 6455
replace sdate = 19881026 if idnum == 6457
replace sdate = 19881026 if idnum == 6459
replace sdate = 19881026 if idnum == 6481
replace sdate = 19881028 if idnum == 6482
replace sdate = 19881027 if idnum == 6485
replace sdate = 19881030 if idnum == 6491
replace sdate = 19881026 if idnum == 6493
replace sdate = 19881026 if idnum == 6494
replace sdate = 19881029 if idnum == 6505
replace sdate = 19881027 if idnum == 6511
replace sdate = 19881104 if idnum == 6512
replace sdate = 19881028 if idnum == 6537
replace sdate = 19881027 if idnum == 6546
replace sdate = 19881027 if idnum == 6552
replace sdate = 19881029 if idnum == 6557
replace sdate = 19881027 if idnum == 6558
replace sdate = 19881027 if idnum == 6563
replace sdate = 19881028 if idnum == 6565
replace sdate = 19881106 if idnum == 6568
replace sdate = 19881030 if idnum == 6569
replace sdate = 19881030 if idnum == 6573
replace sdate = 19881101 if idnum == 6574
replace sdate = 19881031 if idnum == 6585
replace sdate = 19881029 if idnum == 6588
replace sdate = 19881028 if idnum == 6590
replace sdate = 19881031 if idnum == 6599
replace sdate = 19881027 if idnum == 6601
replace sdate = 19881027 if idnum == 6602
replace sdate = 19881029 if idnum == 6605
replace sdate = 19881027 if idnum == 6612
replace sdate = 19881027 if idnum == 6620
replace sdate = 19881027 if idnum == 6623
replace sdate = 19881030 if idnum == 6625
replace sdate = 19881102 if idnum == 6629
replace sdate = 19881027 if idnum == 6634
replace sdate = 19881029 if idnum == 6637
replace sdate = 19881027 if idnum == 6640
replace sdate = 19881027 if idnum == 6641
replace sdate = 19881028 if idnum == 6643
replace sdate = 19881031 if idnum == 6646
replace sdate = 19881027 if idnum == 6648
replace sdate = 19881027 if idnum == 6660
replace sdate = 19881027 if idnum == 6661
replace sdate = 19881027 if idnum == 6666
replace sdate = 19881028 if idnum == 6669
replace sdate = 19881027 if idnum == 6670
replace sdate = 19881029 if idnum == 6673
replace sdate = 19881028 if idnum == 6676
replace sdate = 19881028 if idnum == 6678
replace sdate = 19881028 if idnum == 6680
replace sdate = 19881027 if idnum == 6686
replace sdate = 19881028 if idnum == 6694
replace sdate = 19881027 if idnum == 6695
replace sdate = 19881030 if idnum == 6698
replace sdate = 19881027 if idnum == 6702
replace sdate = 19881101 if idnum == 6711
replace sdate = 19881027 if idnum == 6715
replace sdate = 19881029 if idnum == 6724
replace sdate = 19881027 if idnum == 6726
replace sdate = 19881028 if idnum == 6728
replace sdate = 19881027 if idnum == 6730
replace sdate = 19881027 if idnum == 6734
replace sdate = 19881028 if idnum == 6742
replace sdate = 19881027 if idnum == 6744
replace sdate = 19881027 if idnum == 6749
replace sdate = 19881028 if idnum == 6755
replace sdate = 19881030 if idnum == 6761
replace sdate = 19881027 if idnum == 6763
replace sdate = 19881028 if idnum == 6775
replace sdate = 19881028 if idnum == 6777
replace sdate = 19881027 if idnum == 6781
replace sdate = 19881030 if idnum == 6782
replace sdate = 19881030 if idnum == 6787
replace sdate = 19881101 if idnum == 6791
replace sdate = 19881028 if idnum == 6792
replace sdate = 19881030 if idnum == 6793
replace sdate = 19881106 if idnum == 6795
replace sdate = 19881106 if idnum == 6797
replace sdate = 19881031 if idnum == 6799
replace sdate = 19881027 if idnum == 6805
replace sdate = 19881027 if idnum == 6806
replace sdate = 19881027 if idnum == 6807
replace sdate = 19881029 if idnum == 6808
replace sdate = 19881028 if idnum == 6834
replace sdate = 19881028 if idnum == 6836
replace sdate = 19881029 if idnum == 6840
replace sdate = 19881029 if idnum == 6842
replace sdate = 19881028 if idnum == 6846
replace sdate = 19881108 if idnum == 6848
replace sdate = 19881028 if idnum == 6850
replace sdate = 19881030 if idnum == 6852
replace sdate = 19881028 if idnum == 6859
replace sdate = 19881028 if idnum == 6864
replace sdate = 19881028 if idnum == 6866
replace sdate = 19881031 if idnum == 6873
replace sdate = 19881028 if idnum == 6874
replace sdate = 19881028 if idnum == 6879
replace sdate = 19881030 if idnum == 6880
replace sdate = 19881030 if idnum == 6883
replace sdate = 19881029 if idnum == 6886
replace sdate = 19881028 if idnum == 6894
replace sdate = 19881102 if idnum == 6895
replace sdate = 19881028 if idnum == 6899
replace sdate = 19881028 if idnum == 6900
replace sdate = 19881030 if idnum == 6901
replace sdate = 19881028 if idnum == 6905
replace sdate = 19881106 if idnum == 6907
replace sdate = 19881028 if idnum == 6910
replace sdate = 19881031 if idnum == 6915
replace sdate = 19881102 if idnum == 6916
replace sdate = 19881028 if idnum == 6917
replace sdate = 19881029 if idnum == 6927
replace sdate = 19881028 if idnum == 6928
replace sdate = 19881030 if idnum == 6937
replace sdate = 19881028 if idnum == 6945
replace sdate = 19881028 if idnum == 6949
replace sdate = 19881028 if idnum == 6950
replace sdate = 19881028 if idnum == 6951
replace sdate = 19881028 if idnum == 6952
replace sdate = 19881028 if idnum == 6956
replace sdate = 19881028 if idnum == 6957
replace sdate = 19881028 if idnum == 6958
replace sdate = 19881029 if idnum == 6960
replace sdate = 19881101 if idnum == 6963
replace sdate = 19881029 if idnum == 6965
replace sdate = 19881028 if idnum == 6976
replace sdate = 19881028 if idnum == 6983
replace sdate = 19881030 if idnum == 6986
replace sdate = 19881031 if idnum == 6997
replace sdate = 19881028 if idnum == 7007
replace sdate = 19881028 if idnum == 7009
replace sdate = 19881028 if idnum == 7019
replace sdate = 19881031 if idnum == 7022
replace sdate = 19881028 if idnum == 7024
replace sdate = 19881028 if idnum == 7026
replace sdate = 19881028 if idnum == 7029
replace sdate = 19881028 if idnum == 7030
replace sdate = 19881106 if idnum == 7031
replace sdate = 19881028 if idnum == 7035
replace sdate = 19881029 if idnum == 7044
replace sdate = 19881029 if idnum == 7046
replace sdate = 19881028 if idnum == 7049
replace sdate = 19881028 if idnum == 7050
replace sdate = 19881029 if idnum == 7054
replace sdate = 19881028 if idnum == 7055
replace sdate = 19881029 if idnum == 7058
replace sdate = 19881101 if idnum == 7066
replace sdate = 19881028 if idnum == 7077
replace sdate = 19881030 if idnum == 7078
replace sdate = 19881106 if idnum == 7079
replace sdate = 19881030 if idnum == 7089
replace sdate = 19881031 if idnum == 7091
replace sdate = 19881029 if idnum == 7097
replace sdate = 19881031 if idnum == 7100
replace sdate = 19881031 if idnum == 7104
replace sdate = 19881028 if idnum == 7106
replace sdate = 19881029 if idnum == 7129
replace sdate = 19881101 if idnum == 7131
replace sdate = 19881031 if idnum == 7135
replace sdate = 19881109 if idnum == 7137
replace sdate = 19881029 if idnum == 7150
replace sdate = 19881029 if idnum == 7151
replace sdate = 19881029 if idnum == 7152
replace sdate = 19881031 if idnum == 7154
replace sdate = 19881029 if idnum == 7156
replace sdate = 19881029 if idnum == 7159
replace sdate = 19881029 if idnum == 7160
replace sdate = 19881101 if idnum == 7163
replace sdate = 19881029 if idnum == 7164
replace sdate = 19881030 if idnum == 7166
replace sdate = 19881029 if idnum == 7172
replace sdate = 19881029 if idnum == 7179
replace sdate = 19881031 if idnum == 7180
replace sdate = 19881030 if idnum == 7187
replace sdate = 19881029 if idnum == 7189
replace sdate = 19881029 if idnum == 7195
replace sdate = 19881030 if idnum == 7196
replace sdate = 19881030 if idnum == 7201
replace sdate = 19881030 if idnum == 7204
replace sdate = 19881029 if idnum == 7206
replace sdate = 19881029 if idnum == 7209
replace sdate = 19881029 if idnum == 7210
replace sdate = 19881029 if idnum == 7217
replace sdate = 19881030 if idnum == 7218
replace sdate = 19881029 if idnum == 7219
replace sdate = 19881102 if idnum == 7227
replace sdate = 19881030 if idnum == 7228
replace sdate = 19881101 if idnum == 7229
replace sdate = 19881106 if idnum == 7230
replace sdate = 19881029 if idnum == 7233
replace sdate = 19881102 if idnum == 7234
replace sdate = 19881029 if idnum == 7236
replace sdate = 19881030 if idnum == 7237
replace sdate = 19881029 if idnum == 7240
replace sdate = 19881031 if idnum == 7243
replace sdate = 19881101 if idnum == 7247
replace sdate = 19881029 if idnum == 7248
replace sdate = 19881102 if idnum == 7249
replace sdate = 19881030 if idnum == 7252
replace sdate = 19881030 if idnum == 7261
replace sdate = 19881029 if idnum == 7271
replace sdate = 19881106 if idnum == 7280
replace sdate = 19881029 if idnum == 7285
replace sdate = 19881029 if idnum == 7287
replace sdate = 19881031 if idnum == 7289
replace sdate = 19881115 if idnum == 7290
replace sdate = 19881029 if idnum == 7295
replace sdate = 19881029 if idnum == 7296
replace sdate = 19881029 if idnum == 7297
replace sdate = 19881029 if idnum == 7303
replace sdate = 19881029 if idnum == 7311
replace sdate = 19881029 if idnum == 7315
replace sdate = 19881029 if idnum == 7325
replace sdate = 19881029 if idnum == 7333
replace sdate = 19881101 if idnum == 7334
replace sdate = 19881029 if idnum == 7345
replace sdate = 19881029 if idnum == 7351
replace sdate = 19881029 if idnum == 7353
replace sdate = 19881029 if idnum == 7355
replace sdate = 19881029 if idnum == 7357
replace sdate = 19881029 if idnum == 7360
replace sdate = 19881030 if idnum == 7361
replace sdate = 19881029 if idnum == 7364
replace sdate = 19881029 if idnum == 7372
replace sdate = 19881029 if idnum == 7374
replace sdate = 19881029 if idnum == 7375
replace sdate = 19881029 if idnum == 7377
replace sdate = 19881029 if idnum == 7383
replace sdate = 19881109 if idnum == 7384
replace sdate = 19881030 if idnum == 7394
replace sdate = 19881029 if idnum == 7396
replace sdate = 19881031 if idnum == 7398
replace sdate = 19881031 if idnum == 7399
replace sdate = 19881102 if idnum == 7403
replace sdate = 19881031 if idnum == 7405
replace sdate = 19881030 if idnum == 7431
replace sdate = 19881030 if idnum == 7432
replace sdate = 19881031 if idnum == 7435
replace sdate = 19881030 if idnum == 7436
replace sdate = 19881030 if idnum == 7442
replace sdate = 19881107 if idnum == 7445
replace sdate = 19881031 if idnum == 7447
replace sdate = 19881031 if idnum == 7461
replace sdate = 19881030 if idnum == 7462
replace sdate = 19881102 if idnum == 7464
replace sdate = 19881030 if idnum == 7476
replace sdate = 19881030 if idnum == 7495
replace sdate = 19881030 if idnum == 7498
replace sdate = 19881101 if idnum == 7501
replace sdate = 19881104 if idnum == 7502
replace sdate = 19881101 if idnum == 7503
replace sdate = 19881030 if idnum == 7504
replace sdate = 19881031 if idnum == 7507
replace sdate = 19881030 if idnum == 7514
replace sdate = 19881116 if idnum == 7515
replace sdate = 19881030 if idnum == 7516
replace sdate = 19881031 if idnum == 7517
replace sdate = 19881030 if idnum == 7522
replace sdate = 19881106 if idnum == 7525
replace sdate = 19881030 if idnum == 7526
replace sdate = 19881102 if idnum == 7529
replace sdate = 19881031 if idnum == 7537
replace sdate = 19881030 if idnum == 7547
replace sdate = 19881030 if idnum == 7549
replace sdate = 19881110 if idnum == 7553
replace sdate = 19881030 if idnum == 7559
replace sdate = 19881030 if idnum == 7562
replace sdate = 19881030 if idnum == 7570
replace sdate = 19881101 if idnum == 7572
replace sdate = 19881030 if idnum == 7573
replace sdate = 19881030 if idnum == 7575
replace sdate = 19881030 if idnum == 7578
replace sdate = 19881103 if idnum == 7583
replace sdate = 19881031 if idnum == 7585
replace sdate = 19881030 if idnum == 7590
replace sdate = 19881030 if idnum == 7591
replace sdate = 19881031 if idnum == 7594
replace sdate = 19881030 if idnum == 7596
replace sdate = 19881030 if idnum == 7600
replace sdate = 19881030 if idnum == 7602
replace sdate = 19881102 if idnum == 7613
replace sdate = 19881030 if idnum == 7616
replace sdate = 19881030 if idnum == 7629
replace sdate = 19881030 if idnum == 7631
replace sdate = 19881117 if idnum == 7640
replace sdate = 19881030 if idnum == 7645
replace sdate = 19881030 if idnum == 7646
replace sdate = 19881031 if idnum == 7648
replace sdate = 19881030 if idnum == 7650
replace sdate = 19881113 if idnum == 7655
replace sdate = 19881030 if idnum == 7656
replace sdate = 19881102 if idnum == 7657
replace sdate = 19881102 if idnum == 7661
replace sdate = 19881101 if idnum == 7663
replace sdate = 19881030 if idnum == 7667
replace sdate = 19881030 if idnum == 7677
replace sdate = 19881030 if idnum == 7680
replace sdate = 19881118 if idnum == 7682
replace sdate = 19881101 if idnum == 7686
replace sdate = 19881030 if idnum == 7688
replace sdate = 19881030 if idnum == 7690
replace sdate = 19881031 if idnum == 7693
replace sdate = 19881030 if idnum == 7702
replace sdate = 19881031 if idnum == 7732
replace sdate = 19881105 if idnum == 7735
replace sdate = 19881107 if idnum == 7741
replace sdate = 19881031 if idnum == 7742
replace sdate = 19881105 if idnum == 7745
replace sdate = 19881102 if idnum == 7747
replace sdate = 19881101 if idnum == 7749
replace sdate = 19881031 if idnum == 7751
replace sdate = 19881108 if idnum == 7752
replace sdate = 19881101 if idnum == 7756
replace sdate = 19881103 if idnum == 7758
replace sdate = 19881101 if idnum == 7765
replace sdate = 19881116 if idnum == 7766
replace sdate = 19881101 if idnum == 7769
replace sdate = 19881031 if idnum == 7770
replace sdate = 19881101 if idnum == 7779
replace sdate = 19881031 if idnum == 7782
replace sdate = 19881102 if idnum == 7784
replace sdate = 19881102 if idnum == 7785
replace sdate = 19881101 if idnum == 7791
replace sdate = 19881102 if idnum == 7792
replace sdate = 19881031 if idnum == 7805
replace sdate = 19881102 if idnum == 7809
replace sdate = 19881031 if idnum == 7811
replace sdate = 19881031 if idnum == 7812
replace sdate = 19881031 if idnum == 7814
replace sdate = 19881031 if idnum == 7817
replace sdate = 19881105 if idnum == 7820
replace sdate = 19881102 if idnum == 7827
replace sdate = 19881031 if idnum == 7839
replace sdate = 19881031 if idnum == 7841
replace sdate = 19881101 if idnum == 7845
replace sdate = 19881111 if idnum == 7847
replace sdate = 19881031 if idnum == 7850
replace sdate = 19881101 if idnum == 7853
replace sdate = 19881104 if idnum == 7854
replace sdate = 19881103 if idnum == 7857
replace sdate = 19881031 if idnum == 7862
replace sdate = 19881102 if idnum == 7863
replace sdate = 19881105 if idnum == 7867
replace sdate = 19881031 if idnum == 7880
replace sdate = 19881109 if idnum == 7889
replace sdate = 19881031 if idnum == 7892
replace sdate = 19881113 if idnum == 7895
replace sdate = 19881031 if idnum == 7896
replace sdate = 19881102 if idnum == 7898
replace sdate = 19881031 if idnum == 7901
replace sdate = 19881119 if idnum == 7905
replace sdate = 19881031 if idnum == 7909
replace sdate = 19881031 if idnum == 7910
replace sdate = 19881102 if idnum == 7915
replace sdate = 19881103 if idnum == 7927
replace sdate = 19881031 if idnum == 7930
replace sdate = 19881101 if idnum == 7931
replace sdate = 19881104 if idnum == 7933
replace sdate = 19881108 if idnum == 7934
replace sdate = 19881101 if idnum == 7937
replace sdate = 19881031 if idnum == 7939
replace sdate = 19881031 if idnum == 7950
replace sdate = 19881031 if idnum == 7959
replace sdate = 19881101 if idnum == 7960
replace sdate = 19881031 if idnum == 7968
replace sdate = 19881101 if idnum == 7972
replace sdate = 19881031 if idnum == 7974
replace sdate = 19881117 if idnum == 7975
replace sdate = 19881031 if idnum == 7978
replace sdate = 19881031 if idnum == 7984
replace sdate = 19881031 if idnum == 7991
replace sdate = 19881119 if idnum == 7996
replace sdate = 19881031 if idnum == 7998
replace sdate = 19881031 if idnum == 7999
replace sdate = 19881110 if idnum == 8020
replace sdate = 19881101 if idnum == 8025
replace sdate = 19881102 if idnum == 8027
replace sdate = 19881102 if idnum == 8028
replace sdate = 19881101 if idnum == 8031
replace sdate = 19881101 if idnum == 8034
replace sdate = 19881101 if idnum == 8039
replace sdate = 19881101 if idnum == 8047
replace sdate = 19881101 if idnum == 8055
replace sdate = 19881101 if idnum == 8059
replace sdate = 19881101 if idnum == 8075
replace sdate = 19881102 if idnum == 8077
replace sdate = 19881101 if idnum == 8078
replace sdate = 19881106 if idnum == 8080
replace sdate = 19881101 if idnum == 8081
replace sdate = 19881101 if idnum == 8084
replace sdate = 19881102 if idnum == 8091
replace sdate = 19881104 if idnum == 8104
replace sdate = 19881101 if idnum == 8105
replace sdate = 19881101 if idnum == 8106
replace sdate = 19881101 if idnum == 8111
replace sdate = 19881101 if idnum == 8112
replace sdate = 19881101 if idnum == 8115
replace sdate = 19881109 if idnum == 8117
replace sdate = 19881101 if idnum == 8122
replace sdate = 19881101 if idnum == 8127
replace sdate = 19881101 if idnum == 8130
replace sdate = 19881101 if idnum == 8136
replace sdate = 19881101 if idnum == 8140
replace sdate = 19881101 if idnum == 8151
replace sdate = 19881103 if idnum == 8159
replace sdate = 19881101 if idnum == 8162
replace sdate = 19881101 if idnum == 8163
replace sdate = 19881102 if idnum == 8169
replace sdate = 19881102 if idnum == 8172
replace sdate = 19881101 if idnum == 8177
replace sdate = 19881101 if idnum == 8178
replace sdate = 19881101 if idnum == 8180
replace sdate = 19881102 if idnum == 8181
replace sdate = 19881101 if idnum == 8183
replace sdate = 19881101 if idnum == 8184
replace sdate = 19881105 if idnum == 8190
replace sdate = 19881101 if idnum == 8191
replace sdate = 19881101 if idnum == 8195
replace sdate = 19881105 if idnum == 8196
replace sdate = 19881107 if idnum == 8199
replace sdate = 19881101 if idnum == 8205
replace sdate = 19881101 if idnum == 8206
replace sdate = 19881101 if idnum == 8207
replace sdate = 19881105 if idnum == 8209
replace sdate = 19881103 if idnum == 8212
replace sdate = 19881102 if idnum == 8215
replace sdate = 19881101 if idnum == 8217
replace sdate = 19881101 if idnum == 8221
replace sdate = 19881102 if idnum == 8225
replace sdate = 19881101 if idnum == 8227
replace sdate = 19881102 if idnum == 8231
replace sdate = 19881101 if idnum == 8236
replace sdate = 19881101 if idnum == 8237
replace sdate = 19881101 if idnum == 8239
replace sdate = 19881106 if idnum == 8240
replace sdate = 19881101 if idnum == 8245
replace sdate = 19881101 if idnum == 8248
replace sdate = 19881101 if idnum == 8261
replace sdate = 19881101 if idnum == 8262
replace sdate = 19881107 if idnum == 8270
replace sdate = 19881101 if idnum == 8273
replace sdate = 19881101 if idnum == 8277
replace sdate = 19881101 if idnum == 8282
replace sdate = 19881101 if idnum == 8284
replace sdate = 19881116 if idnum == 8292
replace sdate = 19881105 if idnum == 8296
replace sdate = 19881102 if idnum == 8320
replace sdate = 19881104 if idnum == 8322
replace sdate = 19881105 if idnum == 8325
replace sdate = 19881102 if idnum == 8328
replace sdate = 19881102 if idnum == 8332
replace sdate = 19881103 if idnum == 8333
replace sdate = 19881105 if idnum == 8335
replace sdate = 19881102 if idnum == 8341
replace sdate = 19881102 if idnum == 8345
replace sdate = 19881102 if idnum == 8351
replace sdate = 19881102 if idnum == 8355
replace sdate = 19881102 if idnum == 8356
replace sdate = 19881102 if idnum == 8362
replace sdate = 19881103 if idnum == 8363
replace sdate = 19881103 if idnum == 8364
replace sdate = 19881106 if idnum == 8365
replace sdate = 19881106 if idnum == 8369
replace sdate = 19881104 if idnum == 8371
replace sdate = 19881102 if idnum == 8377
replace sdate = 19881105 if idnum == 8379
replace sdate = 19881105 if idnum == 8382
replace sdate = 19881102 if idnum == 8393
replace sdate = 19881102 if idnum == 8397
replace sdate = 19881104 if idnum == 8399
replace sdate = 19881102 if idnum == 8401
replace sdate = 19881105 if idnum == 8403
replace sdate = 19881106 if idnum == 8407
replace sdate = 19881103 if idnum == 8413
replace sdate = 19881102 if idnum == 8420
replace sdate = 19881103 if idnum == 8426
replace sdate = 19881103 if idnum == 8429
replace sdate = 19881103 if idnum == 8433
replace sdate = 19881104 if idnum == 8443
replace sdate = 19881105 if idnum == 8449
replace sdate = 19881102 if idnum == 8453
replace sdate = 19881102 if idnum == 8455
replace sdate = 19881107 if idnum == 8462
replace sdate = 19881107 if idnum == 8463
replace sdate = 19881102 if idnum == 8470
replace sdate = 19881114 if idnum == 8471
replace sdate = 19881102 if idnum == 8474
replace sdate = 19881102 if idnum == 8478
replace sdate = 19881102 if idnum == 8479
replace sdate = 19881103 if idnum == 8482
replace sdate = 19881118 if idnum == 8487
replace sdate = 19881102 if idnum == 8488
replace sdate = 19881103 if idnum == 8493
replace sdate = 19881103 if idnum == 8497
replace sdate = 19881102 if idnum == 8498
replace sdate = 19881104 if idnum == 8504
replace sdate = 19881103 if idnum == 8505
replace sdate = 19881102 if idnum == 8509
replace sdate = 19881104 if idnum == 8513
replace sdate = 19881102 if idnum == 8517
replace sdate = 19881102 if idnum == 8531
replace sdate = 19881108 if idnum == 8533
replace sdate = 19881105 if idnum == 8534
replace sdate = 19881102 if idnum == 8543
replace sdate = 19881102 if idnum == 8544
replace sdate = 19881102 if idnum == 8547
replace sdate = 19881104 if idnum == 8551
replace sdate = 19881102 if idnum == 8552
replace sdate = 19881116 if idnum == 8553
replace sdate = 19881102 if idnum == 8554
replace sdate = 19881105 if idnum == 8555
replace sdate = 19881104 if idnum == 8559
replace sdate = 19881102 if idnum == 8561
replace sdate = 19881102 if idnum == 8564
replace sdate = 19881115 if idnum == 8566
replace sdate = 19881108 if idnum == 8568
replace sdate = 19881102 if idnum == 8574
replace sdate = 19881103 if idnum == 8576
replace sdate = 19881104 if idnum == 8580
replace sdate = 19881102 if idnum == 8591
replace sdate = 19881105 if idnum == 8592
replace sdate = 19881113 if idnum == 8593
replace sdate = 19881103 if idnum == 8614
replace sdate = 19881103 if idnum == 8621
replace sdate = 19881103 if idnum == 8623
replace sdate = 19881105 if idnum == 8626
replace sdate = 19881103 if idnum == 8632
replace sdate = 19881103 if idnum == 8634
replace sdate = 19881104 if idnum == 8638
replace sdate = 19881103 if idnum == 8641
replace sdate = 19881103 if idnum == 8644
replace sdate = 19881103 if idnum == 8645
replace sdate = 19881104 if idnum == 8647
replace sdate = 19881106 if idnum == 8649
replace sdate = 19881103 if idnum == 8652
replace sdate = 19881108 if idnum == 8661
replace sdate = 19881109 if idnum == 8665
replace sdate = 19881105 if idnum == 8666
replace sdate = 19881103 if idnum == 8668
replace sdate = 19881105 if idnum == 8669
replace sdate = 19881103 if idnum == 8670
replace sdate = 19881103 if idnum == 8672
replace sdate = 19881118 if idnum == 8673
replace sdate = 19881104 if idnum == 8674
replace sdate = 19881103 if idnum == 8682
replace sdate = 19881104 if idnum == 8683
replace sdate = 19881103 if idnum == 8685
replace sdate = 19881103 if idnum == 8689
replace sdate = 19881104 if idnum == 8692
replace sdate = 19881103 if idnum == 8695
replace sdate = 19881106 if idnum == 8700
replace sdate = 19881103 if idnum == 8703
replace sdate = 19881104 if idnum == 8706
replace sdate = 19881103 if idnum == 8708
replace sdate = 19881103 if idnum == 8715
replace sdate = 19881105 if idnum == 8731
replace sdate = 19881103 if idnum == 8732
replace sdate = 19881103 if idnum == 8733
replace sdate = 19881103 if idnum == 8739
replace sdate = 19881104 if idnum == 8741
replace sdate = 19881108 if idnum == 8743
replace sdate = 19881117 if idnum == 8748
replace sdate = 19881111 if idnum == 8749
replace sdate = 19881106 if idnum == 8751
replace sdate = 19881103 if idnum == 8759
replace sdate = 19881103 if idnum == 8761
replace sdate = 19881103 if idnum == 8762
replace sdate = 19881103 if idnum == 8763
replace sdate = 19881108 if idnum == 8764
replace sdate = 19881103 if idnum == 8768
replace sdate = 19881112 if idnum == 8770
replace sdate = 19881103 if idnum == 8771
replace sdate = 19881104 if idnum == 8772
replace sdate = 19881105 if idnum == 8773
replace sdate = 19881103 if idnum == 8776
replace sdate = 19881105 if idnum == 8781
replace sdate = 19881120 if idnum == 8782
replace sdate = 19881103 if idnum == 8783
replace sdate = 19881104 if idnum == 8784
replace sdate = 19881103 if idnum == 8788
replace sdate = 19881105 if idnum == 8790
replace sdate = 19881104 if idnum == 8793
replace sdate = 19881107 if idnum == 8794
replace sdate = 19881103 if idnum == 8795
replace sdate = 19881103 if idnum == 8797
replace sdate = 19881104 if idnum == 8798
replace sdate = 19881109 if idnum == 8803
replace sdate = 19881103 if idnum == 8805
replace sdate = 19881105 if idnum == 8806
replace sdate = 19881104 if idnum == 8808
replace sdate = 19881107 if idnum == 8809
replace sdate = 19881115 if idnum == 8811
replace sdate = 19881111 if idnum == 8814
replace sdate = 19881105 if idnum == 8821
replace sdate = 19881109 if idnum == 8822
replace sdate = 19881108 if idnum == 8823
replace sdate = 19881103 if idnum == 8824
replace sdate = 19881104 if idnum == 8833
replace sdate = 19881105 if idnum == 8834
replace sdate = 19881103 if idnum == 8837
replace sdate = 19881116 if idnum == 8840
replace sdate = 19881105 if idnum == 8846
replace sdate = 19881103 if idnum == 8847
replace sdate = 19881103 if idnum == 8850
replace sdate = 19881103 if idnum == 8851
replace sdate = 19881104 if idnum == 8854
replace sdate = 19881103 if idnum == 8862
replace sdate = 19881105 if idnum == 8870
replace sdate = 19881103 if idnum == 8875
replace sdate = 19881105 if idnum == 8890
replace sdate = 19881119 if idnum == 8896
replace sdate = 19881104 if idnum == 8916
replace sdate = 19881105 if idnum == 8919
replace sdate = 19881105 if idnum == 8921
replace sdate = 19881104 if idnum == 8924
replace sdate = 19881105 if idnum == 8926
replace sdate = 19881113 if idnum == 8930
replace sdate = 19881104 if idnum == 8932
replace sdate = 19881106 if idnum == 8933
replace sdate = 19881104 if idnum == 8941
replace sdate = 19881104 if idnum == 8944
replace sdate = 19881104 if idnum == 8956
replace sdate = 19881104 if idnum == 8962
replace sdate = 19881104 if idnum == 8970
replace sdate = 19881112 if idnum == 8976
replace sdate = 19881104 if idnum == 8978
replace sdate = 19881107 if idnum == 8985
replace sdate = 19881109 if idnum == 8986
replace sdate = 19881104 if idnum == 8995
replace sdate = 19881104 if idnum == 8996
replace sdate = 19881106 if idnum == 8997
replace sdate = 19881104 if idnum == 8998
replace sdate = 19881105 if idnum == 9000
replace sdate = 19881104 if idnum == 9001
replace sdate = 19881104 if idnum == 9003
replace sdate = 19881105 if idnum == 9009
replace sdate = 19881104 if idnum == 9016
replace sdate = 19881108 if idnum == 9018
replace sdate = 19881106 if idnum == 9019
replace sdate = 19881104 if idnum == 9021
replace sdate = 19881104 if idnum == 9024
replace sdate = 19881106 if idnum == 9025
replace sdate = 19881104 if idnum == 9030
replace sdate = 19881104 if idnum == 9031
replace sdate = 19881110 if idnum == 9034
replace sdate = 19881104 if idnum == 9041
replace sdate = 19881104 if idnum == 9044
replace sdate = 19881107 if idnum == 9045
replace sdate = 19881104 if idnum == 9051
replace sdate = 19881104 if idnum == 9052
replace sdate = 19881109 if idnum == 9053
replace sdate = 19881108 if idnum == 9055
replace sdate = 19881104 if idnum == 9057
replace sdate = 19881104 if idnum == 9059
replace sdate = 19881115 if idnum == 9063
replace sdate = 19881104 if idnum == 9068
replace sdate = 19881104 if idnum == 9070
replace sdate = 19881104 if idnum == 9071
replace sdate = 19881104 if idnum == 9076
replace sdate = 19881106 if idnum == 9078
replace sdate = 19881104 if idnum == 9081
replace sdate = 19881104 if idnum == 9082
replace sdate = 19881107 if idnum == 9085
replace sdate = 19881104 if idnum == 9086
replace sdate = 19881104 if idnum == 9089
replace sdate = 19881104 if idnum == 9097
replace sdate = 19881104 if idnum == 9107
replace sdate = 19881106 if idnum == 9108
replace sdate = 19881104 if idnum == 9112
replace sdate = 19881104 if idnum == 9114
replace sdate = 19881104 if idnum == 9115
replace sdate = 19881104 if idnum == 9116
replace sdate = 19881105 if idnum == 9118
replace sdate = 19881105 if idnum == 9120
replace sdate = 19881105 if idnum == 9121
replace sdate = 19881110 if idnum == 9122
replace sdate = 19881113 if idnum == 9124
replace sdate = 19881104 if idnum == 9128
replace sdate = 19881106 if idnum == 9133
replace sdate = 19881105 if idnum == 9139
replace sdate = 19881109 if idnum == 9141
replace sdate = 19881106 if idnum == 9142
replace sdate = 19881113 if idnum == 9144
replace sdate = 19881105 if idnum == 9149
replace sdate = 19881105 if idnum == 9150
replace sdate = 19881104 if idnum == 9152
replace sdate = 19881104 if idnum == 9156
replace sdate = 19881104 if idnum == 9157
replace sdate = 19881107 if idnum == 9164
replace sdate = 19881104 if idnum == 9170
replace sdate = 19881115 if idnum == 9176
replace sdate = 19881108 if idnum == 9178
replace sdate = 19881104 if idnum == 9179
replace sdate = 19881105 if idnum == 9184
replace sdate = 19881104 if idnum == 9185
replace sdate = 19881109 if idnum == 9220
replace sdate = 19881105 if idnum == 9226
replace sdate = 19881118 if idnum == 9227
replace sdate = 19881105 if idnum == 9230
replace sdate = 19881110 if idnum == 9235
replace sdate = 19881105 if idnum == 9236
replace sdate = 19881106 if idnum == 9249
replace sdate = 19881113 if idnum == 9250
replace sdate = 19881105 if idnum == 9252
replace sdate = 19881105 if idnum == 9257
replace sdate = 19881108 if idnum == 9259
replace sdate = 19881106 if idnum == 9261
replace sdate = 19881105 if idnum == 9266
replace sdate = 19881106 if idnum == 9269
replace sdate = 19881105 if idnum == 9275
replace sdate = 19881107 if idnum == 9278
replace sdate = 19881108 if idnum == 9280
replace sdate = 19881105 if idnum == 9281
replace sdate = 19881106 if idnum == 9282
replace sdate = 19881105 if idnum == 9283
replace sdate = 19881105 if idnum == 9285
replace sdate = 19881106 if idnum == 9291
replace sdate = 19881108 if idnum == 9292
replace sdate = 19881105 if idnum == 9296
replace sdate = 19881105 if idnum == 9297
replace sdate = 19881105 if idnum == 9301
replace sdate = 19881107 if idnum == 9302
replace sdate = 19881108 if idnum == 9310
replace sdate = 19881109 if idnum == 9313
replace sdate = 19881105 if idnum == 9315
replace sdate = 19881105 if idnum == 9318
replace sdate = 19881107 if idnum == 9320
replace sdate = 19881105 if idnum == 9323
replace sdate = 19881105 if idnum == 9332
replace sdate = 19881105 if idnum == 9336
replace sdate = 19881106 if idnum == 9337
replace sdate = 19881105 if idnum == 9340
replace sdate = 19881111 if idnum == 9343
replace sdate = 19881109 if idnum == 9345
replace sdate = 19881118 if idnum == 9350
replace sdate = 19881105 if idnum == 9352
replace sdate = 19881106 if idnum == 9353
replace sdate = 19881106 if idnum == 9358
replace sdate = 19881105 if idnum == 9363
replace sdate = 19881106 if idnum == 9366
replace sdate = 19881108 if idnum == 9368
replace sdate = 19881116 if idnum == 9369
replace sdate = 19881105 if idnum == 9371
replace sdate = 19881105 if idnum == 9373
replace sdate = 19881105 if idnum == 9378
replace sdate = 19881105 if idnum == 9381
replace sdate = 19881105 if idnum == 9388
replace sdate = 19881106 if idnum == 9389
replace sdate = 19881105 if idnum == 9390
replace sdate = 19881105 if idnum == 9391
replace sdate = 19881105 if idnum == 9395
replace sdate = 19881105 if idnum == 9401
replace sdate = 19881106 if idnum == 9407
replace sdate = 19881105 if idnum == 9414
replace sdate = 19881107 if idnum == 9415
replace sdate = 19881106 if idnum == 9416
replace sdate = 19881105 if idnum == 9419
replace sdate = 19881105 if idnum == 9427
replace sdate = 19881105 if idnum == 9429
replace sdate = 19881106 if idnum == 9434
replace sdate = 19881106 if idnum == 9439
replace sdate = 19881105 if idnum == 9442
replace sdate = 19881106 if idnum == 9446
replace sdate = 19881105 if idnum == 9450
replace sdate = 19881107 if idnum == 9451
replace sdate = 19881107 if idnum == 9452
replace sdate = 19881113 if idnum == 9453
replace sdate = 19881105 if idnum == 9456
replace sdate = 19881119 if idnum == 9457
replace sdate = 19881120 if idnum == 9459
replace sdate = 19881105 if idnum == 9461
replace sdate = 19881105 if idnum == 9465
replace sdate = 19881107 if idnum == 9467
replace sdate = 19881105 if idnum == 9473
replace sdate = 19881106 if idnum == 9478
replace sdate = 19881105 if idnum == 9481
replace sdate = 19881119 if idnum == 9482
replace sdate = 19881105 if idnum == 9484
replace sdate = 19881106 if idnum == 9506
replace sdate = 19881108 if idnum == 9513
replace sdate = 19881106 if idnum == 9519
replace sdate = 19881106 if idnum == 9520
replace sdate = 19881108 if idnum == 9523
replace sdate = 19881106 if idnum == 9524
replace sdate = 19881106 if idnum == 9527
replace sdate = 19881106 if idnum == 9530
replace sdate = 19881107 if idnum == 9536
replace sdate = 19881107 if idnum == 9537
replace sdate = 19881106 if idnum == 9544
replace sdate = 19881106 if idnum == 9545
replace sdate = 19881106 if idnum == 9548
replace sdate = 19881107 if idnum == 9551
replace sdate = 19881106 if idnum == 9552
replace sdate = 19881106 if idnum == 9553
replace sdate = 19881106 if idnum == 9554
replace sdate = 19881106 if idnum == 9556
replace sdate = 19881106 if idnum == 9563
replace sdate = 19881106 if idnum == 9569
replace sdate = 19881106 if idnum == 9570
replace sdate = 19881106 if idnum == 9574
replace sdate = 19881106 if idnum == 9578
replace sdate = 19881106 if idnum == 9583
replace sdate = 19881106 if idnum == 9586
replace sdate = 19881109 if idnum == 9587
replace sdate = 19881108 if idnum == 9590
replace sdate = 19881106 if idnum == 9594
replace sdate = 19881120 if idnum == 9595
replace sdate = 19881106 if idnum == 9603
replace sdate = 19881106 if idnum == 9607
replace sdate = 19881108 if idnum == 9609
replace sdate = 19881109 if idnum == 9610
replace sdate = 19881106 if idnum == 9615
replace sdate = 19881107 if idnum == 9617
replace sdate = 19881106 if idnum == 9620
replace sdate = 19881106 if idnum == 9623
replace sdate = 19881106 if idnum == 9626
replace sdate = 19881109 if idnum == 9631
replace sdate = 19881108 if idnum == 9635
replace sdate = 19881107 if idnum == 9638
replace sdate = 19881106 if idnum == 9639
replace sdate = 19881106 if idnum == 9644
replace sdate = 19881106 if idnum == 9649
replace sdate = 19881109 if idnum == 9650
replace sdate = 19881107 if idnum == 9656
replace sdate = 19881106 if idnum == 9659
replace sdate = 19881109 if idnum == 9660
replace sdate = 19881106 if idnum == 9661
replace sdate = 19881107 if idnum == 9664
replace sdate = 19881110 if idnum == 9665
replace sdate = 19881106 if idnum == 9671
replace sdate = 19881106 if idnum == 9672
replace sdate = 19881106 if idnum == 9679
replace sdate = 19881106 if idnum == 9683
replace sdate = 19881110 if idnum == 9687
replace sdate = 19881107 if idnum == 9690
replace sdate = 19881110 if idnum == 9700
replace sdate = 19881109 if idnum == 9702
replace sdate = 19881106 if idnum == 9704
replace sdate = 19881106 if idnum == 9708
replace sdate = 19881106 if idnum == 9713
replace sdate = 19881106 if idnum == 9714
replace sdate = 19881110 if idnum == 9715
replace sdate = 19881106 if idnum == 9720
replace sdate = 19881116 if idnum == 9726
replace sdate = 19881106 if idnum == 9727
replace sdate = 19881112 if idnum == 9736
replace sdate = 19881107 if idnum == 9737
replace sdate = 19881107 if idnum == 9739
replace sdate = 19881106 if idnum == 9740
replace sdate = 19881106 if idnum == 9745
replace sdate = 19881106 if idnum == 9750
replace sdate = 19881106 if idnum == 9753
replace sdate = 19881106 if idnum == 9755
replace sdate = 19881109 if idnum == 9756
replace sdate = 19881108 if idnum == 9762
replace sdate = 19881106 if idnum == 9771
replace sdate = 19881106 if idnum == 9772
replace sdate = 19881107 if idnum == 9805
replace sdate = 19881107 if idnum == 9809
replace sdate = 19881109 if idnum == 9812
replace sdate = 19881107 if idnum == 9817
replace sdate = 19881107 if idnum == 9819
replace sdate = 19881107 if idnum == 9826
replace sdate = 19881108 if idnum == 9827
replace sdate = 19881107 if idnum == 9830
replace sdate = 19881107 if idnum == 9839
replace sdate = 19881108 if idnum == 9843
replace sdate = 19881109 if idnum == 9845
replace sdate = 19881107 if idnum == 9846
replace sdate = 19881119 if idnum == 9849
replace sdate = 19881114 if idnum == 9850
replace sdate = 19881108 if idnum == 9852
replace sdate = 19881109 if idnum == 9857
replace sdate = 19881107 if idnum == 9862
replace sdate = 19881120 if idnum == 9863
replace sdate = 19881107 if idnum == 9864
replace sdate = 19881107 if idnum == 9869
replace sdate = 19881107 if idnum == 9876
replace sdate = 19881113 if idnum == 9883
replace sdate = 19881110 if idnum == 9886
replace sdate = 19881108 if idnum == 9887
replace sdate = 19881109 if idnum == 9894
replace sdate = 19881115 if idnum == 9896
replace sdate = 19881114 if idnum == 9897
replace sdate = 19881113 if idnum == 9899
replace sdate = 19881107 if idnum == 9902
replace sdate = 19881108 if idnum == 9906
replace sdate = 19881108 if idnum == 9908
replace sdate = 19881107 if idnum == 9909
replace sdate = 19881107 if idnum == 9912
replace sdate = 19881108 if idnum == 9913
replace sdate = 19881113 if idnum == 9914
replace sdate = 19881107 if idnum == 9916
replace sdate = 19881111 if idnum == 9923
replace sdate = 19881107 if idnum == 9924
replace sdate = 19881107 if idnum == 9929
replace sdate = 19881107 if idnum == 9933
replace sdate = 19881107 if idnum == 9938
replace sdate = 19881112 if idnum == 9940
replace sdate = 19881107 if idnum == 9943
replace sdate = 19881107 if idnum == 9944
replace sdate = 19881118 if idnum == 9945
replace sdate = 19881108 if idnum == 9951
replace sdate = 19881114 if idnum == 9953
replace sdate = 19881107 if idnum == 9954
replace sdate = 19881108 if idnum == 9958
replace sdate = 19881107 if idnum == 9968
replace sdate = 19881107 if idnum == 9973
replace sdate = 19881107 if idnum == 9979
replace sdate = 19881107 if idnum == 9983
replace sdate = 19881107 if idnum == 9993
replace sdate = 19881107 if idnum == 10006
replace sdate = 19881109 if idnum == 10012
replace sdate = 19881109 if idnum == 10014
replace sdate = 19881108 if idnum == 10019
replace sdate = 19881107 if idnum == 10024
replace sdate = 19881107 if idnum == 10026
replace sdate = 19881109 if idnum == 10027
replace sdate = 19881108 if idnum == 10028
replace sdate = 19881107 if idnum == 10033
replace sdate = 19881108 if idnum == 10034
replace sdate = 19881109 if idnum == 10041
replace sdate = 19881107 if idnum == 10043
replace sdate = 19881107 if idnum == 10044
replace sdate = 19881107 if idnum == 10049
replace sdate = 19881109 if idnum == 10053
replace sdate = 19881107 if idnum == 10056
replace sdate = 19881116 if idnum == 10060
replace sdate = 19881109 if idnum == 10063
replace sdate = 19881108 if idnum == 10068
replace sdate = 19881107 if idnum == 10071
replace sdate = 19881109 if idnum == 10074
replace sdate = 19881109 if idnum == 10100
replace sdate = 19881108 if idnum == 10103
replace sdate = 19881108 if idnum == 10104
replace sdate = 19881108 if idnum == 10110
replace sdate = 19881109 if idnum == 10112
replace sdate = 19881117 if idnum == 10113
replace sdate = 19881120 if idnum == 10114
replace sdate = 19881108 if idnum == 10116
replace sdate = 19881109 if idnum == 10119
replace sdate = 19881108 if idnum == 10120
replace sdate = 19881110 if idnum == 10121
replace sdate = 19881109 if idnum == 10124
replace sdate = 19881113 if idnum == 10128
replace sdate = 19881108 if idnum == 10135
replace sdate = 19881109 if idnum == 10136
replace sdate = 19881110 if idnum == 10138
replace sdate = 19881108 if idnum == 10139
replace sdate = 19881113 if idnum == 10140
replace sdate = 19881109 if idnum == 10141
replace sdate = 19881109 if idnum == 10147
replace sdate = 19881113 if idnum == 10148
replace sdate = 19881108 if idnum == 10154
replace sdate = 19881108 if idnum == 10156
replace sdate = 19881108 if idnum == 10159
replace sdate = 19881108 if idnum == 10162
replace sdate = 19881111 if idnum == 10167
replace sdate = 19881112 if idnum == 10171
replace sdate = 19881109 if idnum == 10173
replace sdate = 19881108 if idnum == 10175
replace sdate = 19881113 if idnum == 10178
replace sdate = 19881108 if idnum == 10182
replace sdate = 19881108 if idnum == 10188
replace sdate = 19881109 if idnum == 10189
replace sdate = 19881113 if idnum == 10190
replace sdate = 19881114 if idnum == 10191
replace sdate = 19881111 if idnum == 10202
replace sdate = 19881109 if idnum == 10205
replace sdate = 19881110 if idnum == 10208
replace sdate = 19881108 if idnum == 10215
replace sdate = 19881108 if idnum == 10220
replace sdate = 19881110 if idnum == 10223
replace sdate = 19881108 if idnum == 10235
replace sdate = 19881113 if idnum == 10241
replace sdate = 19881108 if idnum == 10242
replace sdate = 19881118 if idnum == 10248
replace sdate = 19881108 if idnum == 10250
replace sdate = 19881109 if idnum == 10258
replace sdate = 19881113 if idnum == 10263
replace sdate = 19881108 if idnum == 10266
replace sdate = 19881108 if idnum == 10271
replace sdate = 19881108 if idnum == 10274
replace sdate = 19881117 if idnum == 10281
replace sdate = 19881120 if idnum == 10285
replace sdate = 19881108 if idnum == 10286
replace sdate = 19881108 if idnum == 10293
replace sdate = 19881108 if idnum == 10295
replace sdate = 19881108 if idnum == 10297
replace sdate = 19881109 if idnum == 10298
replace sdate = 19881108 if idnum == 10299
replace sdate = 19881108 if idnum == 10307
replace sdate = 19881116 if idnum == 10308
replace sdate = 19881108 if idnum == 10311
replace sdate = 19881114 if idnum == 10315
replace sdate = 19881108 if idnum == 10325
replace sdate = 19881108 if idnum == 10335
replace sdate = 19881110 if idnum == 10346
replace sdate = 19881109 if idnum == 10349
replace sdate = 19881119 if idnum == 10350
replace sdate = 19881112 if idnum == 10353
replace sdate = 19881108 if idnum == 10357
replace sdate = 19881108 if idnum == 10361
replace sdate = 19881109 if idnum == 10369
replace sdate = 19881108 if idnum == 10375
replace sdate = 19881120 if idnum == 10382
replace sdate = 19881113 if idnum == 10396
replace sdate = 19881109 if idnum == 10397
replace sdate = 19881112 if idnum == 10398
replace sdate = 19881113 if idnum == 10401
replace sdate = 19881110 if idnum == 10406
replace sdate = 19881110 if idnum == 10407
replace sdate = 19881109 if idnum == 10409
replace sdate = 19881109 if idnum == 10415
replace sdate = 19881109 if idnum == 10418
replace sdate = 19881113 if idnum == 10421
replace sdate = 19881110 if idnum == 10424
replace sdate = 19881110 if idnum == 10427
replace sdate = 19881109 if idnum == 10428
replace sdate = 19881111 if idnum == 10438
replace sdate = 19881119 if idnum == 10444
replace sdate = 19881117 if idnum == 10446
replace sdate = 19881113 if idnum == 10447
replace sdate = 19881113 if idnum == 10457
replace sdate = 19881109 if idnum == 10459
replace sdate = 19881111 if idnum == 10462
replace sdate = 19881109 if idnum == 10466
replace sdate = 19881114 if idnum == 10468
replace sdate = 19881110 if idnum == 10473
replace sdate = 19881110 if idnum == 10474
replace sdate = 19881109 if idnum == 10481
replace sdate = 19881112 if idnum == 10484
replace sdate = 19881110 if idnum == 10487
replace sdate = 19881110 if idnum == 10488
replace sdate = 19881109 if idnum == 10489
replace sdate = 19881109 if idnum == 10491
replace sdate = 19881109 if idnum == 10492
replace sdate = 19881109 if idnum == 10502
replace sdate = 19881109 if idnum == 10503
replace sdate = 19881109 if idnum == 10507
replace sdate = 19881109 if idnum == 10512
replace sdate = 19881109 if idnum == 10513
replace sdate = 19881109 if idnum == 10514
replace sdate = 19881109 if idnum == 10528
replace sdate = 19881110 if idnum == 10530
replace sdate = 19881109 if idnum == 10535
replace sdate = 19881112 if idnum == 10540
replace sdate = 19881119 if idnum == 10542
replace sdate = 19881109 if idnum == 10558
replace sdate = 19881111 if idnum == 10560
replace sdate = 19881116 if idnum == 10570
replace sdate = 19881115 if idnum == 10573
replace sdate = 19881109 if idnum == 10585
replace sdate = 19881112 if idnum == 10586
replace sdate = 19881118 if idnum == 10591
replace sdate = 19881109 if idnum == 10595
replace sdate = 19881109 if idnum == 10596
replace sdate = 19881109 if idnum == 10597
replace sdate = 19881109 if idnum == 10600
replace sdate = 19881109 if idnum == 10603
replace sdate = 19881109 if idnum == 10606
replace sdate = 19881117 if idnum == 10610
replace sdate = 19881117 if idnum == 10614
replace sdate = 19881109 if idnum == 10618
replace sdate = 19881109 if idnum == 10620
replace sdate = 19881114 if idnum == 10623
replace sdate = 19881111 if idnum == 10624
replace sdate = 19881111 if idnum == 10628
replace sdate = 19881109 if idnum == 10631
replace sdate = 19881113 if idnum == 10635
replace sdate = 19881109 if idnum == 10639
replace sdate = 19881109 if idnum == 10650
replace sdate = 19881109 if idnum == 10651
replace sdate = 19881113 if idnum == 10658
replace sdate = 19881109 if idnum == 10659
replace sdate = 19881109 if idnum == 10660
replace sdate = 19881119 if idnum == 10672
replace sdate = 19881112 if idnum == 10694
replace sdate = 19881110 if idnum == 10699
replace sdate = 19881117 if idnum == 10703
replace sdate = 19881110 if idnum == 10706
replace sdate = 19881110 if idnum == 10707
replace sdate = 19881110 if idnum == 10708
replace sdate = 19881110 if idnum == 10709
replace sdate = 19881110 if idnum == 10712
replace sdate = 19881110 if idnum == 10726
replace sdate = 19881115 if idnum == 10728
replace sdate = 19881113 if idnum == 10729
replace sdate = 19881110 if idnum == 10730
replace sdate = 19881113 if idnum == 10732
replace sdate = 19881110 if idnum == 10736
replace sdate = 19881119 if idnum == 10737
replace sdate = 19881110 if idnum == 10744
replace sdate = 19881113 if idnum == 10746
replace sdate = 19881111 if idnum == 10747
replace sdate = 19881111 if idnum == 10749
replace sdate = 19881111 if idnum == 10751
replace sdate = 19881110 if idnum == 10754
replace sdate = 19881114 if idnum == 10755
replace sdate = 19881112 if idnum == 10756
replace sdate = 19881115 if idnum == 10757
replace sdate = 19881110 if idnum == 10759
replace sdate = 19881113 if idnum == 10766
replace sdate = 19881111 if idnum == 10769
replace sdate = 19881110 if idnum == 10772
replace sdate = 19881111 if idnum == 10774
replace sdate = 19881111 if idnum == 10776
replace sdate = 19881110 if idnum == 10777
replace sdate = 19881110 if idnum == 10779
replace sdate = 19881110 if idnum == 10786
replace sdate = 19881110 if idnum == 10787
replace sdate = 19881110 if idnum == 10789
replace sdate = 19881120 if idnum == 10794
replace sdate = 19881111 if idnum == 10796
replace sdate = 19881119 if idnum == 10797
replace sdate = 19881110 if idnum == 10800
replace sdate = 19881114 if idnum == 10801
replace sdate = 19881112 if idnum == 10802
replace sdate = 19881116 if idnum == 10806
replace sdate = 19881112 if idnum == 10809
replace sdate = 19881111 if idnum == 10814
replace sdate = 19881119 if idnum == 10815
replace sdate = 19881111 if idnum == 10817
replace sdate = 19881110 if idnum == 10824
replace sdate = 19881110 if idnum == 10828
replace sdate = 19881113 if idnum == 10831
replace sdate = 19881114 if idnum == 10833
replace sdate = 19881119 if idnum == 10838
replace sdate = 19881110 if idnum == 10839
replace sdate = 19881110 if idnum == 10845
replace sdate = 19881111 if idnum == 10849
replace sdate = 19881118 if idnum == 10853
replace sdate = 19881110 if idnum == 10855
replace sdate = 19881115 if idnum == 10856
replace sdate = 19881111 if idnum == 10857
replace sdate = 19881111 if idnum == 10864
replace sdate = 19881111 if idnum == 10865
replace sdate = 19881110 if idnum == 10867
replace sdate = 19881111 if idnum == 10869
replace sdate = 19881117 if idnum == 10870
replace sdate = 19881113 if idnum == 10872
replace sdate = 19881110 if idnum == 10880
replace sdate = 19881110 if idnum == 10890
replace sdate = 19881112 if idnum == 10892
replace sdate = 19881110 if idnum == 10893
replace sdate = 19881110 if idnum == 10894
replace sdate = 19881110 if idnum == 10895
replace sdate = 19881111 if idnum == 10899
replace sdate = 19881116 if idnum == 10902
replace sdate = 19881110 if idnum == 10905
replace sdate = 19881113 if idnum == 10908
replace sdate = 19881110 if idnum == 10913
replace sdate = 19881111 if idnum == 10919
replace sdate = 19881110 if idnum == 10923
replace sdate = 19881113 if idnum == 10927
replace sdate = 19881110 if idnum == 10930
replace sdate = 19881111 if idnum == 10931
replace sdate = 19881112 if idnum == 10934
replace sdate = 19881110 if idnum == 10938
replace sdate = 19881110 if idnum == 10940
replace sdate = 19881110 if idnum == 10946
replace sdate = 19881115 if idnum == 10952
replace sdate = 19881110 if idnum == 10955
replace sdate = 19881112 if idnum == 10961
replace sdate = 19881110 if idnum == 10964
replace sdate = 19881112 if idnum == 10969
replace sdate = 19881111 if idnum == 10990
replace sdate = 19881116 if idnum == 10995
replace sdate = 19881111 if idnum == 10997
replace sdate = 19881112 if idnum == 10999
replace sdate = 19881111 if idnum == 11003
replace sdate = 19881111 if idnum == 11007
replace sdate = 19881113 if idnum == 11008
replace sdate = 19881111 if idnum == 11013
replace sdate = 19881115 if idnum == 11016
replace sdate = 19881111 if idnum == 11020
replace sdate = 19881113 if idnum == 11023
replace sdate = 19881117 if idnum == 11026
replace sdate = 19881111 if idnum == 11029
replace sdate = 19881111 if idnum == 11033
replace sdate = 19881114 if idnum == 11037
replace sdate = 19881111 if idnum == 11043
replace sdate = 19881111 if idnum == 11049
replace sdate = 19881111 if idnum == 11054
replace sdate = 19881112 if idnum == 11058
replace sdate = 19881111 if idnum == 11060
replace sdate = 19881113 if idnum == 11061
replace sdate = 19881120 if idnum == 11063
replace sdate = 19881112 if idnum == 11068
replace sdate = 19881116 if idnum == 11069
replace sdate = 19881111 if idnum == 11073
replace sdate = 19881112 if idnum == 11075
replace sdate = 19881111 if idnum == 11076
replace sdate = 19881113 if idnum == 11087
replace sdate = 19881114 if idnum == 11094
replace sdate = 19881112 if idnum == 11095
replace sdate = 19881111 if idnum == 11098
replace sdate = 19881118 if idnum == 11101
replace sdate = 19881115 if idnum == 11102
replace sdate = 19881113 if idnum == 11105
replace sdate = 19881111 if idnum == 11106
replace sdate = 19881111 if idnum == 11114
replace sdate = 19881113 if idnum == 11115
replace sdate = 19881113 if idnum == 11116
replace sdate = 19881119 if idnum == 11125
replace sdate = 19881112 if idnum == 11128
replace sdate = 19881111 if idnum == 11129
replace sdate = 19881111 if idnum == 11132
replace sdate = 19881111 if idnum == 11135
replace sdate = 19881114 if idnum == 11137
replace sdate = 19881111 if idnum == 11144
replace sdate = 19881111 if idnum == 11145
replace sdate = 19881111 if idnum == 11155
replace sdate = 19881120 if idnum == 11157
replace sdate = 19881120 if idnum == 11176
replace sdate = 19881111 if idnum == 11179
replace sdate = 19881111 if idnum == 11189
replace sdate = 19881111 if idnum == 11190
replace sdate = 19881111 if idnum == 11191
replace sdate = 19881116 if idnum == 11193
replace sdate = 19881112 if idnum == 11194
replace sdate = 19881111 if idnum == 11202
replace sdate = 19881115 if idnum == 11203
replace sdate = 19881111 if idnum == 11204
replace sdate = 19881111 if idnum == 11207
replace sdate = 19881116 if idnum == 11208
replace sdate = 19881111 if idnum == 11213
replace sdate = 19881112 if idnum == 11214
replace sdate = 19881111 if idnum == 11215
replace sdate = 19881118 if idnum == 11217
replace sdate = 19881114 if idnum == 11219
replace sdate = 19881115 if idnum == 11223
replace sdate = 19881111 if idnum == 11225
replace sdate = 19881116 if idnum == 11229
replace sdate = 19881112 if idnum == 11230
replace sdate = 19881113 if idnum == 11232
replace sdate = 19881111 if idnum == 11234
replace sdate = 19881111 if idnum == 11236
replace sdate = 19881111 if idnum == 11241
replace sdate = 19881111 if idnum == 11251
replace sdate = 19881111 if idnum == 11252
replace sdate = 19881111 if idnum == 11254
replace sdate = 19881111 if idnum == 11255
replace sdate = 19881111 if idnum == 11260
replace sdate = 19881111 if idnum == 11262
replace sdate = 19881111 if idnum == 11264
replace sdate = 19881111 if idnum == 11265
replace sdate = 19881112 if idnum == 11289
replace sdate = 19881112 if idnum == 11292
replace sdate = 19881112 if idnum == 11313
replace sdate = 19881112 if idnum == 11316
replace sdate = 19881115 if idnum == 11319
replace sdate = 19881112 if idnum == 11323
replace sdate = 19881118 if idnum == 11328
replace sdate = 19881112 if idnum == 11329
replace sdate = 19881112 if idnum == 11333
replace sdate = 19881112 if idnum == 11335
replace sdate = 19881118 if idnum == 11337
replace sdate = 19881117 if idnum == 11339
replace sdate = 19881112 if idnum == 11341
replace sdate = 19881112 if idnum == 11342
replace sdate = 19881114 if idnum == 11344
replace sdate = 19881115 if idnum == 11345
replace sdate = 19881116 if idnum == 11352
replace sdate = 19881112 if idnum == 11355
replace sdate = 19881112 if idnum == 11362
replace sdate = 19881112 if idnum == 11364
replace sdate = 19881112 if idnum == 11366
replace sdate = 19881112 if idnum == 11367
replace sdate = 19881116 if idnum == 11369
replace sdate = 19881113 if idnum == 11375
replace sdate = 19881114 if idnum == 11377
replace sdate = 19881112 if idnum == 11379
replace sdate = 19881112 if idnum == 11384
replace sdate = 19881112 if idnum == 11387
replace sdate = 19881115 if idnum == 11389
replace sdate = 19881112 if idnum == 11393
replace sdate = 19881116 if idnum == 11401
replace sdate = 19881119 if idnum == 11402
replace sdate = 19881112 if idnum == 11404
replace sdate = 19881112 if idnum == 11409
replace sdate = 19881112 if idnum == 11413
replace sdate = 19881112 if idnum == 11421
replace sdate = 19881112 if idnum == 11424
replace sdate = 19881112 if idnum == 11428
replace sdate = 19881119 if idnum == 11429
replace sdate = 19881112 if idnum == 11435
replace sdate = 19881113 if idnum == 11443
replace sdate = 19881115 if idnum == 11445
replace sdate = 19881112 if idnum == 11446
replace sdate = 19881115 if idnum == 11453
replace sdate = 19881112 if idnum == 11459
replace sdate = 19881112 if idnum == 11460
replace sdate = 19881112 if idnum == 11461
replace sdate = 19881112 if idnum == 11464
replace sdate = 19881112 if idnum == 11468
replace sdate = 19881112 if idnum == 11485
replace sdate = 19881112 if idnum == 11488
replace sdate = 19881113 if idnum == 11491
replace sdate = 19881112 if idnum == 11497
replace sdate = 19881118 if idnum == 11499
replace sdate = 19881113 if idnum == 11501
replace sdate = 19881112 if idnum == 11514
replace sdate = 19881112 if idnum == 11520
replace sdate = 19881119 if idnum == 11529
replace sdate = 19881112 if idnum == 11532
replace sdate = 19881113 if idnum == 11538
replace sdate = 19881112 if idnum == 11540
replace sdate = 19881112 if idnum == 11543
replace sdate = 19881112 if idnum == 11548
replace sdate = 19881112 if idnum == 11551
replace sdate = 19881112 if idnum == 11556
replace sdate = 19881112 if idnum == 11557
replace sdate = 19881114 if idnum == 11585
replace sdate = 19881113 if idnum == 11590
replace sdate = 19881117 if idnum == 11591
replace sdate = 19881113 if idnum == 11600
replace sdate = 19881117 if idnum == 11602
replace sdate = 19881114 if idnum == 11604
replace sdate = 19881114 if idnum == 11605
replace sdate = 19881119 if idnum == 11618
replace sdate = 19881120 if idnum == 11626
replace sdate = 19881113 if idnum == 11631
replace sdate = 19881113 if idnum == 11634
replace sdate = 19881114 if idnum == 11636
replace sdate = 19881117 if idnum == 11639
replace sdate = 19881116 if idnum == 11643
replace sdate = 19881113 if idnum == 11647
replace sdate = 19881113 if idnum == 11652
replace sdate = 19881113 if idnum == 11659
replace sdate = 19881113 if idnum == 11662
replace sdate = 19881113 if idnum == 11666
replace sdate = 19881115 if idnum == 11670
replace sdate = 19881113 if idnum == 11671
replace sdate = 19881113 if idnum == 11674
replace sdate = 19881113 if idnum == 11680
replace sdate = 19881115 if idnum == 11684
replace sdate = 19881113 if idnum == 11686
replace sdate = 19881118 if idnum == 11694
replace sdate = 19881113 if idnum == 11696
replace sdate = 19881114 if idnum == 11698
replace sdate = 19881113 if idnum == 11699
replace sdate = 19881113 if idnum == 11703
replace sdate = 19881113 if idnum == 11709
replace sdate = 19881116 if idnum == 11716
replace sdate = 19881115 if idnum == 11718
replace sdate = 19881113 if idnum == 11723
replace sdate = 19881113 if idnum == 11726
replace sdate = 19881113 if idnum == 11728
replace sdate = 19881113 if idnum == 11729
replace sdate = 19881114 if idnum == 11731
replace sdate = 19881114 if idnum == 11734
replace sdate = 19881115 if idnum == 11735
replace sdate = 19881113 if idnum == 11738
replace sdate = 19881113 if idnum == 11739
replace sdate = 19881113 if idnum == 11744
replace sdate = 19881113 if idnum == 11751
replace sdate = 19881116 if idnum == 11758
replace sdate = 19881113 if idnum == 11775
replace sdate = 19881113 if idnum == 11780
replace sdate = 19881113 if idnum == 11784
replace sdate = 19881114 if idnum == 11789
replace sdate = 19881114 if idnum == 11790
replace sdate = 19881113 if idnum == 11792
replace sdate = 19881116 if idnum == 11794
replace sdate = 19881113 if idnum == 11801
replace sdate = 19881113 if idnum == 11804
replace sdate = 19881117 if idnum == 11805
replace sdate = 19881113 if idnum == 11807
replace sdate = 19881113 if idnum == 11812
replace sdate = 19881113 if idnum == 11814
replace sdate = 19881113 if idnum == 11820
replace sdate = 19881113 if idnum == 11824
replace sdate = 19881118 if idnum == 11827
replace sdate = 19881117 if idnum == 11833
replace sdate = 19881113 if idnum == 11846
replace sdate = 19881114 if idnum == 11847
replace sdate = 19881119 if idnum == 11850
replace sdate = 19881115 if idnum == 11855
replace sdate = 19881116 if idnum == 11883
replace sdate = 19881116 if idnum == 11888
replace sdate = 19881116 if idnum == 11889
replace sdate = 19881114 if idnum == 11894
replace sdate = 19881116 if idnum == 11896
replace sdate = 19881118 if idnum == 11898
replace sdate = 19881116 if idnum == 11901
replace sdate = 19881114 if idnum == 11902
replace sdate = 19881115 if idnum == 11908
replace sdate = 19881115 if idnum == 11911
replace sdate = 19881117 if idnum == 11912
replace sdate = 19881114 if idnum == 11924
replace sdate = 19881115 if idnum == 11936
replace sdate = 19881114 if idnum == 11938
replace sdate = 19881114 if idnum == 11941
replace sdate = 19881116 if idnum == 11948
replace sdate = 19881117 if idnum == 11951
replace sdate = 19881114 if idnum == 11952
replace sdate = 19881114 if idnum == 11958
replace sdate = 19881114 if idnum == 11961
replace sdate = 19881114 if idnum == 11962
replace sdate = 19881114 if idnum == 11964
replace sdate = 19881115 if idnum == 11966
replace sdate = 19881117 if idnum == 11969
replace sdate = 19881114 if idnum == 11974
replace sdate = 19881115 if idnum == 11975
replace sdate = 19881118 if idnum == 11984
replace sdate = 19881114 if idnum == 11990
replace sdate = 19881114 if idnum == 11993
replace sdate = 19881114 if idnum == 11994
replace sdate = 19881114 if idnum == 11997
replace sdate = 19881114 if idnum == 11999
replace sdate = 19881114 if idnum == 12001
replace sdate = 19881114 if idnum == 12002
replace sdate = 19881115 if idnum == 12009
replace sdate = 19881114 if idnum == 12013
replace sdate = 19881114 if idnum == 12021
replace sdate = 19881114 if idnum == 12028
replace sdate = 19881114 if idnum == 12034
replace sdate = 19881114 if idnum == 12040
replace sdate = 19881114 if idnum == 12041
replace sdate = 19881114 if idnum == 12052
replace sdate = 19881115 if idnum == 12053
replace sdate = 19881114 if idnum == 12054
replace sdate = 19881114 if idnum == 12056
replace sdate = 19881117 if idnum == 12065
replace sdate = 19881114 if idnum == 12080
replace sdate = 19881114 if idnum == 12081
replace sdate = 19881114 if idnum == 12082
replace sdate = 19881114 if idnum == 12085
replace sdate = 19881114 if idnum == 12093
replace sdate = 19881114 if idnum == 12104
replace sdate = 19881114 if idnum == 12107
replace sdate = 19881114 if idnum == 12108
replace sdate = 19881114 if idnum == 12119
replace sdate = 19881114 if idnum == 12123
replace sdate = 19881114 if idnum == 12126
replace sdate = 19881115 if idnum == 12129
replace sdate = 19881120 if idnum == 12137
replace sdate = 19881114 if idnum == 12144
replace sdate = 19881114 if idnum == 12148
replace sdate = 19881120 if idnum == 12152
replace sdate = 19881114 if idnum == 12153
replace sdate = 19881114 if idnum == 12156
replace sdate = 19881114 if idnum == 12157
replace sdate = 19881114 if idnum == 12159
replace sdate = 19881116 if idnum == 12183
replace sdate = 19881119 if idnum == 12186
replace sdate = 19881116 if idnum == 12189
replace sdate = 19881116 if idnum == 12191
replace sdate = 19881115 if idnum == 12195
replace sdate = 19881116 if idnum == 12196
replace sdate = 19881115 if idnum == 12202
replace sdate = 19881116 if idnum == 12203
replace sdate = 19881115 if idnum == 12210
replace sdate = 19881116 if idnum == 12215
replace sdate = 19881116 if idnum == 12221
replace sdate = 19881115 if idnum == 12225
replace sdate = 19881116 if idnum == 12236
replace sdate = 19881115 if idnum == 12239
replace sdate = 19881115 if idnum == 12244
replace sdate = 19881115 if idnum == 12248
replace sdate = 19881115 if idnum == 12251
replace sdate = 19881117 if idnum == 12252
replace sdate = 19881115 if idnum == 12256
replace sdate = 19881116 if idnum == 12258
replace sdate = 19881115 if idnum == 12265
replace sdate = 19881116 if idnum == 12267
replace sdate = 19881115 if idnum == 12273
replace sdate = 19881117 if idnum == 12274
replace sdate = 19881115 if idnum == 12276
replace sdate = 19881117 if idnum == 12277
replace sdate = 19881120 if idnum == 12283
replace sdate = 19881116 if idnum == 12289
replace sdate = 19881115 if idnum == 12292
replace sdate = 19881116 if idnum == 12294
replace sdate = 19881115 if idnum == 12299
replace sdate = 19881115 if idnum == 12302
replace sdate = 19881116 if idnum == 12305
replace sdate = 19881118 if idnum == 12306
replace sdate = 19881115 if idnum == 12308
replace sdate = 19881117 if idnum == 12309
replace sdate = 19881116 if idnum == 12310
replace sdate = 19881115 if idnum == 12313
replace sdate = 19881115 if idnum == 12314
replace sdate = 19881115 if idnum == 12315
replace sdate = 19881115 if idnum == 12317
replace sdate = 19881119 if idnum == 12326
replace sdate = 19881115 if idnum == 12327
replace sdate = 19881116 if idnum == 12335
replace sdate = 19881115 if idnum == 12338
replace sdate = 19881117 if idnum == 12348
replace sdate = 19881115 if idnum == 12352
replace sdate = 19881115 if idnum == 12354
replace sdate = 19881117 if idnum == 12355
replace sdate = 19881116 if idnum == 12357
replace sdate = 19881115 if idnum == 12358
replace sdate = 19881115 if idnum == 12359
replace sdate = 19881115 if idnum == 12361
replace sdate = 19881115 if idnum == 12362
replace sdate = 19881120 if idnum == 12365
replace sdate = 19881116 if idnum == 12368
replace sdate = 19881120 if idnum == 12370
replace sdate = 19881115 if idnum == 12371
replace sdate = 19881118 if idnum == 12380
replace sdate = 19881115 if idnum == 12385
replace sdate = 19881118 if idnum == 12389
replace sdate = 19881115 if idnum == 12404
replace sdate = 19881116 if idnum == 12405
replace sdate = 19881119 if idnum == 12408
replace sdate = 19881116 if idnum == 12411
replace sdate = 19881116 if idnum == 12412
replace sdate = 19881115 if idnum == 12414
replace sdate = 19881116 if idnum == 12417
replace sdate = 19881116 if idnum == 12420
replace sdate = 19881116 if idnum == 12424
replace sdate = 19881115 if idnum == 12429
replace sdate = 19881117 if idnum == 12430
replace sdate = 19881117 if idnum == 12436
replace sdate = 19881115 if idnum == 12439
replace sdate = 19881115 if idnum == 12443
replace sdate = 19881115 if idnum == 12446
replace sdate = 19881116 if idnum == 12447
replace sdate = 19881115 if idnum == 12449
replace sdate = 19881116 if idnum == 12483
replace sdate = 19881116 if idnum == 12487
replace sdate = 19881116 if idnum == 12504
replace sdate = 19881118 if idnum == 12514
replace sdate = 19881116 if idnum == 12522
replace sdate = 19881116 if idnum == 12528
replace sdate = 19881117 if idnum == 12529
replace sdate = 19881118 if idnum == 12531
replace sdate = 19881117 if idnum == 12536
replace sdate = 19881116 if idnum == 12537
replace sdate = 19881116 if idnum == 12540
replace sdate = 19881119 if idnum == 12541
replace sdate = 19881119 if idnum == 12542
replace sdate = 19881116 if idnum == 12546
replace sdate = 19881118 if idnum == 12549
replace sdate = 19881120 if idnum == 12553
replace sdate = 19881116 if idnum == 12555
replace sdate = 19881116 if idnum == 12562
replace sdate = 19881116 if idnum == 12564
replace sdate = 19881116 if idnum == 12568
replace sdate = 19881116 if idnum == 12570
replace sdate = 19881116 if idnum == 12573
replace sdate = 19881116 if idnum == 12587
replace sdate = 19881118 if idnum == 12588
replace sdate = 19881116 if idnum == 12589
replace sdate = 19881117 if idnum == 12594
replace sdate = 19881116 if idnum == 12595
replace sdate = 19881116 if idnum == 12596
replace sdate = 19881118 if idnum == 12600
replace sdate = 19881116 if idnum == 12602
replace sdate = 19881117 if idnum == 12603
replace sdate = 19881117 if idnum == 12611
replace sdate = 19881118 if idnum == 12616
replace sdate = 19881120 if idnum == 12617
replace sdate = 19881116 if idnum == 12618
replace sdate = 19881116 if idnum == 12633
replace sdate = 19881116 if idnum == 12643
replace sdate = 19881116 if idnum == 12646
replace sdate = 19881118 if idnum == 12647
replace sdate = 19881116 if idnum == 12648
replace sdate = 19881116 if idnum == 12651
replace sdate = 19881118 if idnum == 12653
replace sdate = 19881116 if idnum == 12656
replace sdate = 19881116 if idnum == 12658
replace sdate = 19881116 if idnum == 12662
replace sdate = 19881116 if idnum == 12679
replace sdate = 19881116 if idnum == 12682
replace sdate = 19881116 if idnum == 12688
replace sdate = 19881117 if idnum == 12695
replace sdate = 19881118 if idnum == 12696
replace sdate = 19881117 if idnum == 12709
replace sdate = 19881116 if idnum == 12710
replace sdate = 19881116 if idnum == 12713
replace sdate = 19881117 if idnum == 12714
replace sdate = 19881116 if idnum == 12715
replace sdate = 19881116 if idnum == 12718
replace sdate = 19881116 if idnum == 12721
replace sdate = 19881117 if idnum == 12722
replace sdate = 19881118 if idnum == 12725
replace sdate = 19881117 if idnum == 12728
replace sdate = 19881116 if idnum == 12730
replace sdate = 19881116 if idnum == 12731
replace sdate = 19881119 if idnum == 12735
replace sdate = 19881119 if idnum == 12736
replace sdate = 19881119 if idnum == 12740
replace sdate = 19881117 if idnum == 12746
replace sdate = 19881118 if idnum == 12785
replace sdate = 19881117 if idnum == 12788
replace sdate = 19881120 if idnum == 12793
replace sdate = 19881118 if idnum == 12799
replace sdate = 19881117 if idnum == 12802
replace sdate = 19881117 if idnum == 12803
replace sdate = 19881117 if idnum == 12810
replace sdate = 19881117 if idnum == 12811
replace sdate = 19881118 if idnum == 12812
replace sdate = 19881117 if idnum == 12818
replace sdate = 19881117 if idnum == 12819
replace sdate = 19881117 if idnum == 12825
replace sdate = 19881117 if idnum == 12829
replace sdate = 19881117 if idnum == 12832
replace sdate = 19881118 if idnum == 12838
replace sdate = 19881120 if idnum == 12841
replace sdate = 19881117 if idnum == 12846
replace sdate = 19881117 if idnum == 12849
replace sdate = 19881117 if idnum == 12851
replace sdate = 19881117 if idnum == 12857
replace sdate = 19881118 if idnum == 12861
replace sdate = 19881120 if idnum == 12867
replace sdate = 19881119 if idnum == 12871
replace sdate = 19881119 if idnum == 12883
replace sdate = 19881118 if idnum == 12890
replace sdate = 19881120 if idnum == 12899
replace sdate = 19881118 if idnum == 12900
replace sdate = 19881117 if idnum == 12901
replace sdate = 19881118 if idnum == 12909
replace sdate = 19881118 if idnum == 12915
replace sdate = 19881118 if idnum == 12932
replace sdate = 19881118 if idnum == 12934
replace sdate = 19881118 if idnum == 12935
replace sdate = 19881119 if idnum == 12936
replace sdate = 19881119 if idnum == 12939
replace sdate = 19881117 if idnum == 12942
replace sdate = 19881118 if idnum == 12956
replace sdate = 19881117 if idnum == 12959
replace sdate = 19881117 if idnum == 12962
replace sdate = 19881118 if idnum == 12965
replace sdate = 19881117 if idnum == 12976
replace sdate = 19881117 if idnum == 12984
replace sdate = 19881118 if idnum == 12992
replace sdate = 19881117 if idnum == 12995
replace sdate = 19881119 if idnum == 13005
replace sdate = 19881117 if idnum == 13014
replace sdate = 19881118 if idnum == 13015
replace sdate = 19881117 if idnum == 13017
replace sdate = 19881117 if idnum == 13022
replace sdate = 19881117 if idnum == 13026
replace sdate = 19881117 if idnum == 13032
replace sdate = 19881118 if idnum == 13040
replace sdate = 19881117 if idnum == 13044
replace sdate = 19881120 if idnum == 13074
replace sdate = 19881118 if idnum == 13086
replace sdate = 19881118 if idnum == 13087
replace sdate = 19881119 if idnum == 13095
replace sdate = 19881118 if idnum == 13107
replace sdate = 19881118 if idnum == 13113
replace sdate = 19881120 if idnum == 13117
replace sdate = 19881119 if idnum == 13120
replace sdate = 19881119 if idnum == 13124
replace sdate = 19881119 if idnum == 13126
replace sdate = 19881118 if idnum == 13130
replace sdate = 19881118 if idnum == 13131
replace sdate = 19881118 if idnum == 13133
replace sdate = 19881118 if idnum == 13143
replace sdate = 19881118 if idnum == 13145
replace sdate = 19881118 if idnum == 13147
replace sdate = 19881118 if idnum == 13148
replace sdate = 19881118 if idnum == 13150
replace sdate = 19881118 if idnum == 13153
replace sdate = 19881118 if idnum == 13155
replace sdate = 19881120 if idnum == 13158
replace sdate = 19881119 if idnum == 13161
replace sdate = 19881120 if idnum == 13168
replace sdate = 19881118 if idnum == 13169
replace sdate = 19881119 if idnum == 13184
replace sdate = 19881118 if idnum == 13186
replace sdate = 19881119 if idnum == 13187
replace sdate = 19881120 if idnum == 13193
replace sdate = 19881120 if idnum == 13199
replace sdate = 19881119 if idnum == 13200
replace sdate = 19881118 if idnum == 13209
replace sdate = 19881119 if idnum == 13230
replace sdate = 19881118 if idnum == 13232
replace sdate = 19881118 if idnum == 13233
replace sdate = 19881119 if idnum == 13240
replace sdate = 19881118 if idnum == 13243
replace sdate = 19881118 if idnum == 13246
replace sdate = 19881118 if idnum == 13248
replace sdate = 19881118 if idnum == 13250
replace sdate = 19881119 if idnum == 13272
replace sdate = 19881118 if idnum == 13274
replace sdate = 19881118 if idnum == 13280
replace sdate = 19881118 if idnum == 13284
replace sdate = 19881119 if idnum == 13285
replace sdate = 19881118 if idnum == 13288
replace sdate = 19881118 if idnum == 13292
replace sdate = 19881119 if idnum == 13303
replace sdate = 19881118 if idnum == 13307
replace sdate = 19881118 if idnum == 13311
replace sdate = 19881118 if idnum == 13322
replace sdate = 19881119 if idnum == 13331
replace sdate = 19881118 if idnum == 13332
replace sdate = 19881118 if idnum == 13340
replace sdate = 19881120 if idnum == 13345
replace sdate = 19881118 if idnum == 13355
replace sdate = 19881120 if idnum == 14008
replace sdate = 19881120 if idnum == 14024
replace sdate = 19881120 if idnum == 14025
replace sdate = 19881119 if idnum == 14027
replace sdate = 19881120 if idnum == 14038
replace sdate = 19881119 if idnum == 14045
replace sdate = 19881119 if idnum == 14053
replace sdate = 19881119 if idnum == 14059
replace sdate = 19881120 if idnum == 14062
replace sdate = 19881119 if idnum == 14065
replace sdate = 19881119 if idnum == 14066
replace sdate = 19881119 if idnum == 14074
replace sdate = 19881119 if idnum == 14075
replace sdate = 19881119 if idnum == 14076
replace sdate = 19881119 if idnum == 14093
replace sdate = 19881119 if idnum == 14094
replace sdate = 19881119 if idnum == 14095
replace sdate = 19881119 if idnum == 14101
replace sdate = 19881120 if idnum == 14107
replace sdate = 19881120 if idnum == 14112
replace sdate = 19881120 if idnum == 14113
replace sdate = 19881119 if idnum == 14119
replace sdate = 19881119 if idnum == 14121
replace sdate = 19881120 if idnum == 14127
replace sdate = 19881119 if idnum == 14130
replace sdate = 19881119 if idnum == 14134
replace sdate = 19881120 if idnum == 14147
replace sdate = 19881120 if idnum == 14157
replace sdate = 19881120 if idnum == 14158
replace sdate = 19881120 if idnum == 14167
replace sdate = 19881119 if idnum == 14169
replace sdate = 19881119 if idnum == 14176
replace sdate = 19881119 if idnum == 14181
replace sdate = 19881119 if idnum == 14186
replace sdate = 19881119 if idnum == 14189
replace sdate = 19881119 if idnum == 14191
replace sdate = 19881120 if idnum == 14194
replace sdate = 19881120 if idnum == 14202
replace sdate = 19881120 if idnum == 14203
replace sdate = 19881119 if idnum == 14204
replace sdate = 19881119 if idnum == 14207
replace sdate = 19881119 if idnum == 14211
replace sdate = 19881119 if idnum == 14223
replace sdate = 19881120 if idnum == 14232
replace sdate = 19881119 if idnum == 14233
replace sdate = 19881120 if idnum == 14255
replace sdate = 19881120 if idnum == 14256
replace sdate = 19881120 if idnum == 14261
replace sdate = 19881120 if idnum == 14266
replace sdate = 19881120 if idnum == 14267
replace sdate = 19881120 if idnum == 14270
replace sdate = 19881120 if idnum == 14273
replace sdate = 19881120 if idnum == 14278
replace sdate = 19881120 if idnum == 14293
replace sdate = 19881120 if idnum == 14298
replace sdate = 19881120 if idnum == 14303
replace sdate = 19881120 if idnum == 14328
replace sdate = 19881120 if idnum == 14330
replace sdate = 19881120 if idnum == 14331
replace sdate = 19881120 if idnum == 14339
replace sdate = 19881120 if idnum == 14344
replace sdate = 19881120 if idnum == 14348
replace sdate = 19881120 if idnum == 14357
replace sdate = 19881120 if idnum == 14359
replace sdate = 19881120 if idnum == 14388
replace sdate = 19881120 if idnum == 14389
replace sdate = 19881120 if idnum == 14397
replace sdate = 19881120 if idnum == 14403
replace sdate = 19881120 if idnum == 14404
replace sdate = 19881120 if idnum == 14406
replace sdate = 19881120 if idnum == 14422
replace sdate = 19881120 if idnum == 14424
replace sdate = 19881120 if idnum == 14425
replace sdate = 19881120 if idnum == 14426
replace sdate = 19881120 if idnum == 14446
replace sdate = 19881120 if idnum == 14448
replace sdate = 19881120 if idnum == 14451
replace sdate = 19881120 if idnum == 14453
replace sdate = 19881120 if idnum == 14456
replace sdate = 19881120 if idnum == 14462
replace sdate = 19881120 if idnum == 14463
replace sdate = 19881120 if idnum == 14465
replace sdate = 19881120 if idnum == 14471
replace sdate = 19881120 if idnum == 14481
replace sdate = 19881009 if idnum == 80001
replace sdate = 19881008 if idnum == 80002
replace sdate = 19881028 if idnum == 80004
replace sdate = 19881028 if idnum == 80005
replace sdate = 19881101 if idnum == 80006
replace sdate = 19881012 if idnum == 80007
replace sdate = 19881012 if idnum == 80008
replace sdate = 19881015 if idnum == 80010
replace sdate = 19881013 if idnum == 80013
replace sdate = 19881023 if idnum == 80015
replace sdate = 19881019 if idnum == 80016
replace sdate = 19881025 if idnum == 80017
replace sdate = 19881031 if idnum == 80018
replace sdate = 19881103 if idnum == 80021
replace sdate = 19881105 if idnum == 80022
replace sdate = 19881116 if idnum == 80023
replace sdate = 19881108 if idnum == 80026
replace sdate = 19881107 if idnum == 80027
replace sdate = 19881113 if idnum == 80029
replace sdate = 19881117 if idnum == 80034
replace sdate = 19881117 if idnum == 80037
replace sdate = 19881120 if idnum == 80043
replace sdate = 19881009 if idnum == 90001
replace sdate = 19881011 if idnum == 90011
replace sdate = 19881017 if idnum == 90022
replace sdate = 19881019 if idnum == 90025
replace sdate = 19881031 if idnum == 90028
replace sdate = 19881026 if idnum == 90030
replace sdate = 19881028 if idnum == 90032
replace sdate = 19881024 if idnum == 90037
replace sdate = 19881103 if idnum == 90039
replace sdate = 19881028 if idnum == 90043
replace sdate = 19881104 if idnum == 90059
replace sdate = 19881119 if idnum == 90062
replace sdate = 19881102 if idnum == 90063
replace sdate = 19881103 if idnum == 90064
replace sdate = 19881103 if idnum == 90067
replace sdate = 19881104 if idnum == 90069
replace sdate = 19881115 if idnum == 90076
replace sdate = 19881107 if idnum == 90077
replace sdate = 19881113 if idnum == 90080
replace sdate = 19881118 if idnum == 90083
replace sdate = 19881112 if idnum == 90086
replace sdate = 19881118 if idnum == 90087
replace sdate = 19881115 if idnum == 90088
replace sdate = 19881113 if idnum == 90091
replace sdate = 19881120 if idnum == 90094
replace sdate = 19881113 if idnum == 90095
replace sdate = 19881115 if idnum == 90096
replace sdate = 19881116 if idnum == 90099
replace sdate = 19881117 if idnum == 90101
replace sdate = 19881119 if idnum == 90106
replace sdate = 19881119 if idnum == 90108
replace sdate = 19881120 if idnum == 90115

gen surveydate=date(string(sdate,"%8.0f"),"YMD")

format %tdMon_DD,_CCYY surveydate

gen edate = 19881121

gen electiondate=date(string(edate,"%8.0f"),"YMD")

format %tdMon_DD,_CCYY electiondate

gen time = (electiondate - surveydate) + 1 // Add one to correct election date

* Gender

gen male = rsex

recode male (5=0)

* Age

gen age = n1

recode age (9998=.)
recode age (9999=.)

replace age = 1988 - age

replace age = . if age < 17

* Education

gen education = n3

recode education (98=.)
recode education (99=.)

* Interest for election

gen interest_election = a1

recode interest_election (8=.)
recode interest_election (9=.)

replace interest_election = 5 - interest_election

* Party identification (national)

gen pidstatus_whole = .

replace pidstatus_whole = 9999 if i1 == . & i4 == .
replace pidstatus_whole = 9999 if i1 == 9
replace pidstatus_whole = 9999 if i1 == 8 & i3 == 9
replace pidstatus_whole = 9999 if i1 == 8 & i3 == 8
replace pidstatus_whole = 9999 if i1 == 4 & i3 == 9

replace pidstatus_whole = 2 if i1 == 4 & i3 == 5 | i1 == 4 & i3 == 8

replace pidstatus_whole = 3 if i1 == 2 & pidstatus_whole!=2 & pidstatus_whole!=9999
replace pidstatus_whole = 3 if i4 == 2 & pidstatus_whole!=2 & pidstatus_whole!=9999

replace pidstatus_whole = 1 if i1!=2 & i1!=. & pidstatus_whole!=2 & pidstatus_whole!=3 & pidstatus_whole!=9999
replace pidstatus_whole = 1 if i4!=2 & i4!=. & pidstatus_whole!=2 & pidstatus_whole!=3 & pidstatus_whole!=9999

gen winner_leaner_whole = 1 if i3 == 1 & pidstatus_whole == 3
gen loser_leaner_whole = 1 if i3 == 1 & pidstatus_whole == 1

replace pidstatus_whole = . if pidstatus_whole == 9999
 
label define pidstatus 1 "Loser PID" 2 "No PID" 3 "Winner PID"
label values pidstatus_whole pidstatus

* Party identification scale (national)

gen pidscale_whole = .

replace pidscale_whole = 1 if pidstatus_whole == 1 & i2 == 1
replace pidscale_whole = 2 if pidstatus_whole == 1 & i2 == 3
replace pidscale_whole = 3 if pidstatus_whole == 1 & i2 == 5 | loser_leaner_whole == 1
replace pidscale_whole = 4 if pidstatus_whole == 2
replace pidscale_whole = 5 if pidstatus_whole == 3 & i2 == 5 | winner_leaner_whole == 1
replace pidscale_whole = 6 if pidstatus_whole == 3 & i2 == 3
replace pidscale_whole = 7 if pidstatus_whole == 3 & i2 == 1

label define pidscale 1 "Very strong loser PID" 2 "Fairly strong loser PID" 3 "Not very strong loser PID" 4 "No PID" 5 "Not very strong winner PID" 6 "Fairly strong winner PID" 7 "Very strong winner PID"
label values pidscale_whole pidscale

* Party identification (district)

gen pidstatus_district = .

replace pidstatus_district = 9999 if i1 == . & i4 == .
replace pidstatus_district = 9999 if i1 == 9
replace pidstatus_district = 9999 if i1 == 8 & i3 == 9
replace pidstatus_district = 9999 if i1 == 8 & i3 == 8
replace pidstatus_district = 9999 if i1 == 4 & i3 == 9

replace pidstatus_district = 2 if i1 == 4 & i3 == 5 | i1 == 4 & i3 == 8

replace pidstatus_district = 3 if i1 == district_outcome & pidstatus_district!=2 & pidstatus_district!=9999
replace pidstatus_district = 3 if i4 == district_outcome & pidstatus_district!=2 & pidstatus_district!=9999

replace pidstatus_district = 1 if i1!=district_outcome & i1!=. & pidstatus_district!=2 & pidstatus_district!=3 & pidstatus_district!=9999
replace pidstatus_district = 1 if i4!=district_outcome & i4!=. & pidstatus_district!=2 & pidstatus_district!=3 & pidstatus_district!=9999

gen winner_leaner_district = 1 if i3 == 1 & pidstatus_district == 3
gen loser_leaner_district = 1 if i3 == 1 & pidstatus_district == 1

replace pidstatus_district = . if pidstatus_district == 9999
 
label values pidstatus_district pidstatus

* Party identification scale (district)

gen pidscale_district = .

replace pidscale_district = 1 if pidstatus_district == 1 & i2 == 1
replace pidscale_district = 2 if pidstatus_district == 1 & i2 == 3
replace pidscale_district = 3 if pidstatus_district == 1 & i2 == 5 | loser_leaner_district == 1
replace pidscale_district = 4 if pidstatus_district == 2
replace pidscale_district = 5 if pidstatus_district == 3 & i2 == 5 | winner_leaner_district == 1
replace pidscale_district = 6 if pidstatus_district == 3 & i2 == 3
replace pidscale_district = 7 if pidstatus_district == 3 & i2 == 1

label values pidscale_district pidscale

* TV news attentiveness

gen tv = a2b

recode tv (8=.)
recode tv (9=.)

replace tv = 6 - tv

recode tv (.=-99)

* Press news attentiveness

gen press = a4b

recode press (8=.)
recode press (9=.)

replace press = 6 - press

recode press (.=-99)

* News attentiveness index

egen news = rowmax(tv press)

recode news (-99=.)

* Political discussion

gen discussion = m1

recode discussion (5=0)
recode discussion (8=.)
recode discussion (9=.)


*********************************
** NATIONAL-LEVEL EXPECTATIONS **
*********************************

* Generate variable identifying incomplete answers

gen pc_chance_whole = f2a
gen lpc_chance_whole = f2b
gen ndp_chance_whole = f2c

recode pc_chance_whole lpc_chance_whole ndp_chance_whole (998=.)
recode pc_chance_whole lpc_chance_whole ndp_chance_whole (999=.)

gen complete_whole = 1 if pc_chance_whole!=. & lpc_chance_whole!=. & ndp_chance_whole!=.

* Generate value of 1 if the expectation for one party is higher or equal to the expectations for at least one other party

gen pc_whole = 1 if pc_chance_whole >= lpc_chance_whole & pc_chance_whole >= ndp_chance_whole & complete_whole == 1
gen lpc_whole = 1 if lpc_chance_whole >= pc_chance_whole & lpc_chance_whole >= ndp_chance_whole & complete_whole == 1
gen ndp_whole = 1 if ndp_chance_whole >= pc_chance_whole & ndp_chance_whole >= lpc_chance_whole & complete_whole == 1
gen oth_whole = 1 if pc_chance_whole == 0 & lpc_chance_whole == 0 & ndp_chance_whole == 0

replace pc_whole = . if oth_whole == 1 & complete_whole == 1
replace lpc_whole = . if oth_whole == 1 & complete_whole == 1
replace ndp_whole = . if oth_whole == 1 & complete_whole == 1

* Generate variable for ambiguous forecasts

gen ambiguous_whole = .

replace ambiguous_whole = 99 if pc_whole == lpc_whole & pc_whole!=. & complete_whole == 1 | pc_whole == ndp_whole & pc_whole!=. & complete_whole == 1
replace ambiguous_whole = 99 if lpc_whole == pc_whole & lpc_whole!=. & complete_whole == 1 | lpc_whole == ndp_whole & lpc_whole!=. & complete_whole == 1
replace ambiguous_whole = 99 if ndp_whole == pc_whole & ndp_whole!=. & complete_whole == 1 | ndp_whole == lpc_whole & ndp_whole!=. & complete_whole == 1

* Generate value of 0 for lower expectations

replace pc_whole = 0 if pc_whole!=1 & complete_whole == 1
replace lpc_whole = 0 if lpc_whole!=1 & complete_whole == 1
replace ndp_whole = 0 if ndp_whole!=1 & complete_whole == 1
replace oth_whole = 0 if oth_whole!=1 & complete_whole == 1

* Forecasts (1 = Liberal, 2 = Conservative, 3 = NDP, 88 = other, 99 = ambiguous)

gen forecast_whole = .

replace forecast_whole = 2 if pc_whole == 1 & complete_whole == 1
replace forecast_whole = 1 if lpc_whole == 1 & complete_whole == 1
replace forecast_whole = 3 if ndp_whole == 1 & complete_whole == 1
replace forecast_whole = 88 if oth_whole == 1 & complete_whole == 1
replace forecast_whole = 99 if ambiguous_whole == 99 & complete_whole == 1

* Identify correct and ambiguous forecasts

gen correct_whole = 0 if forecast_whole!=2 & complete_whole == 1
replace correct_whole = 1 if forecast_whole == 2 & forecast_whole!=99 & complete_whole == 1

replace correct_whole = 0 if forecast_whole == 99 & pc_whole!=1 & complete_whole == 1

replace correct = 0 if f2a == 998 & f2b == 998 & f2c == 998

replace correct_whole = 99 if forecast_whole == 99 & pc_whole==1 & complete_whole == 1

* Generate dichotomous variable (treat ambiguous forecasts as incorrect)

gen correct_whole_d = correct_whole

replace correct_whole_d = 0 if correct_whole_d == 99
replace correct_whole_d = 1 if correct_whole_d == 1


*********************************
** DISTRICT-LEVEL EXPECTATIONS **
*********************************

* Generate variable identifying incomplete answers

gen pc_chance_district = f1a
gen lpc_chance_district = f1b
gen ndp_chance_district = f1c

recode pc_chance_district lpc_chance_district ndp_chance_district (998=.)
recode pc_chance_district lpc_chance_district ndp_chance_district (999=.)

gen complete_district = 1 if pc_chance_district!=. & lpc_chance_district!=. & ndp_chance_district!=.

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate

gen pc_district = 1 if pc_chance_district >= lpc_chance_district & pc_chance_district >= ndp_chance_district & complete_district == 1
gen lpc_district = 1 if lpc_chance_district >= pc_chance_district & lpc_chance_district >= ndp_chance_district & complete_district == 1
gen ndp_district = 1 if ndp_chance_district >= pc_chance_district & ndp_chance_district >= lpc_chance_district & complete_district == 1
gen oth_district = 1 if pc_chance_district == 0 & lpc_chance_district == 0 & ndp_chance_district == 0

replace pc_district = . if oth_district == 1 & complete_district == 1
replace lpc_district = . if oth_district == 1 & complete_district == 1
replace ndp_district = . if oth_district == 1 & complete_district == 1

* Generate variable for ambiguous forecasts

gen ambiguous_district = .

replace ambiguous_district = 99 if pc_district == lpc_district & pc_district!=. & complete_district == 1 | pc_district == ndp_district & pc_district!=. & complete_district == 1
replace ambiguous_district = 99 if lpc_district == pc_district & lpc_district!=. & complete_district == 1 | lpc_district == ndp_district & lpc_district!=. & complete_district == 1
replace ambiguous_district = 99 if ndp_district == pc_district & ndp_district!=. & complete_district == 1 | ndp_district == lpc_district & ndp_district!=. & complete_district == 1

* Generate value of 0 for lower expectations

replace pc_district = 0 if pc_district!=1 & complete_district == 1
replace lpc_district = 0 if lpc_district!=1 & complete_district == 1
replace ndp_district = 0 if ndp_district!=1 & complete_district == 1
replace oth_district = 0 if oth_district!=1 & complete_district == 1

* Forecasts (1 = Liberal, 2 = Conservative, 3 = NDP, 88 = other, 99 = ambiguous)

gen forecast_district = .

replace forecast_district = 2 if pc_district == 1 & complete_district == 1
replace forecast_district = 1 if lpc_district == 1 & complete_district == 1
replace forecast_district = 3 if ndp_district == 1 & complete_district == 1
replace forecast_district = 88 if oth_district == 1 & complete_district == 1
replace forecast_district = 99 if ambiguous_district == 99 & complete_district == 1

* Identify correct and ambiguous forecasts

gen correct_district = 0 if forecast_district!=district_outcome & complete_district == 1
replace correct_district = 1 if forecast_district == district_outcome & forecast_district!=99 & complete_district == 1

replace correct_district = 0 if forecast_district == 99 & pc_district!=1 & district_outcome == 2 & complete_district == 1
replace correct_district = 0 if forecast_district == 99 & lpc_district!=1 & district_outcome == 1 & complete_district == 1
replace correct_district = 0 if forecast_district == 99 & ndp_district!=1 & district_outcome == 3 & complete_district == 1
replace correct_district = 0 if forecast_district == 99 & oth_district!=1 & district_outcome == 88 & complete_district == 1

replace correct_district = 0 if f1a == 998 & f1b == 998 & f1c == 998

replace correct_district = 99 if forecast_district == 99 & lpc_district == 1 & district_outcome == 1 & complete_district == 1
replace correct_district = 99 if forecast_district == 99 & pc_district == 1 & district_outcome == 2 & complete_district == 1
replace correct_district = 99 if forecast_district == 99 & ndp_district == 1 & district_outcome == 3 & complete_district == 1
replace correct_district = 99 if forecast_district == 99 & oth_district == 1 & district_outcome == 88 & complete_district == 1

* Generate dichotomous variable (treat ambiguous forecasts as incorrect)

gen correct_district_d = correct_district

replace correct_district_d = 0 if correct_district_d == 99
replace correct_district_d = 1 if correct_district_d == 1


**********
** SAVE **
**********

save "ca1988_ces.dta", replace


***********************************
** MAIN ANALYSES: NATIONAL-LEVEL **
***********************************

* Regression analysis and percentage of correct and incorrect forecasts (national)

logistic correct_whole_d i.discussion pidscale_whole interest_election news age i.male education time  
estimates table, star(.05 .01 .001)

tab correct_whole_d if e(sample) == 1


****************************************
** SUMMARY STATISTICS: NATIONAL-LEVEL **
****************************************

label variable correct_whole_d "Election winner (DV)"
label variable correct_district_d "District winner (DV)"
label variable discussion "Discussion"
label variable pidscale_whole "National PID"
label variable pidscale_district "District PID"
label variable interest_election "Interest"
label variable news "News attentiveness"
label variable age "Age"
label variable male "Gender (male = 1)"
label variable education "Education"
label variable time "Time of interview"
label variable enep "ENEP"
label variable margin "Margin"

estpost tabstat correct_whole_d discussion pidscale_whole interest_election news age male education time if e(sample) == 1, statistics(n mean p50 sd min max) columns(statistics)

esttab using "ca1988_ces_summary_national.tex", substitute("\begin{table}[htbp]" "\begin{table}[H]") cells("count(label(N) fmt(%9.0fc)) mean(fmt(%5.1f) label(Mean)) p50(fmt(%5.1f) label(Median)) sd(fmt(%5.1f) label(Std. dev.)) min(fmt(%5.1f) label(Min)) max(fmt(%5.1f) label(Max))") label width(\textwidth) nomtitle nonumber noobs booktabs title("Summary statistics -- 1988 Canadian federal election (CES), national level") replace

eststo clear


***********************************
** MAIN ANALYSES: DISTRICT-LEVEL **
***********************************

* Regression analysis and percentage of correct and incorrect forecasts (district)

melogit correct_district_d i.discussion pidscale_district interest_election news age i.male education time enep || district_code: , or
estimates table, star(.05 .01 .001)

tab correct_district_d if e(sample) == 1


****************************************
** SUMMARY STATISTICS: DISTRICT-LEVEL **
****************************************

label variable correct_whole_d "Election winner (DV)"
label variable correct_district_d "District winner (DV)"
label variable discussion "Discussion"
label variable pidscale_whole "National PID"
label variable pidscale_district "District PID"
label variable interest_election "Interest"
label variable news "News attentiveness"
label variable age "Age"
label variable male "Gender (male = 1)"
label variable education "Education"
label variable time "Time of interview"
label variable enep "ENEP"
label variable margin "Margin"

estpost tabstat correct_district_d discussion pidscale_district interest_election news age male education time if e(sample) == 1, statistics(n mean p50 sd min max) columns(statistics)

esttab using "ca1988_ces_summary_district.tex", substitute("\begin{table}[htbp]" "\begin{table}[H]") cells("count(label(N) fmt(%9.0fc)) mean(fmt(%5.1f) label(Mean)) p50(fmt(%5.1f) label(Median)) sd(fmt(%5.1f) label(Std. dev.)) min(fmt(%5.1f) label(Min)) max(fmt(%5.1f) label(Max))") label width(\textwidth) nomtitle nonumber noobs booktabs title("Summary statistics -- 1988 Canadian federal election (CES), district level") replace

eststo clear

log close